python program can start to take advantage of useful python features now even if it is not yet ready to make the full migration the other reason to port to python is that python issues warning messages for deprecated features if you run it with the - command-line option for examplebash- python - python (trunk: : moct : : [gcc (apple computerinc build )on darwin type "help""copyright""creditsor "licensefor more information has_key('foo' _main_ : deprecationwarningdict has_key(not supported in xuse the in operator false >using these warning messages as guideyou should take great care to make sure that your program runs warning-free on python before moving forward with python port providing test coverage python has useful testing modules including doctest and unittest make sure your application has thorough test coverage before attempting python port if your program has not had any tests to this pointnow would be good time to start you will want to make sure your tests cover as much as possible and that all tests pass without any warning messages when run on python using the to tool python includes tool called to that can assist with code migration from python to python this tool is normally found in the tools/scripts directory of the python source distribution and is also installed in the same directory as the python binary on most systems it is command-line tool that would normally run from unix or windows command shell as an exampleconsider the following program that contains number of deprecated features example py import configparser for in xrange( )print * def spam( )if not has_key("spam") ["spam"load_spam(return ["spam"to run to on this programtype " to example pyfor example to example py refactoringtoolskipping implicit fixerbuffer refactoringtoolskipping implicit fixeridioms refactoringtoolskipping implicit fixerset_literal refactoringtoolskipping implicit fixerws_comma --example py (original++example py (refactored@- , + , @ lib fl ff