def command_py2to3 ( args ) : from lib2to3 . main import main sys . exit ( main ( "lib2to3.fixes" , args = args . sources ) )
python 2to3 whole directory
Apply 2to3 tool ( Python2 to Python3 conversion tool ) to Python sources .
def command_py2to3(args):
    """
    Apply '2to3' tool (Python2 to Python3 conversion tool) to Python sources.
    """
    from lib2to3.main import main
    sys.exit(main("lib2to3.fixes", args=args.sources))