to - xrange - example py --example py (original++example py (refactored@- , + , @example py import configparser -for in xrange( )+for in range( )print * def spam( )refactoringtoolfiles that were modifiedrefactoringtoolexample py if you look at example py after this operationyou will find that xrange(has been changed to range(and that no other changes have been made backup of the original example py file is found in example py bak counterpart to the - option is the - option if you use to - fixname filenameit will run all of the fixers except for the ones you listed with the - option although it is possible to instruct to to fix everything and to overwrite all of your filesthis is probably something best avoided in practice keep in mind that code translation is an inexact science and that to is not always going to do the "right thing it is always better to approach code migration in methodical calculated manner as opposed to crossing your fingers and hoping that it all just magically "works to has couple of additional options that may be useful the - option enables verbose mode that prints additional information that might be useful for debugging the - option tells to that you are already using the print statement as function in your code and that it shouldn' be converted (enabled by the from _future_ import print_statement statementa practical porting strategy here is practical strategy for porting python code to python againit is better to approach migration in methodical manner as opposed to doing everything at once make sure your code has an adequate unit testing suite and that all tests pass under python port your code and testing suite to python and make sure that all tests still pass turn on the - option to python address all warning messages and make sure your program runs and passes all tests without any warning messages if you've done this correctlychances are that your code will still work with python and maybe even earlier releases you're really just cleaning out some of the cruft that' accumulated in your program make backup of your code (this goes without saying port the unit testing suite to python and make sure that the testing environment itself is working the individual unit tests themselves will fail (because you haven' yet ported any codehowevera properly written test suite should be able to deal with test failures without having an internal crash of the test software itself lib fl ff