2to3
2to3 is a Python program that automates the conversion of Python 2 source code to Python 3. It is part of the Python standard library, distributed with the lib2to3 package, and has been available since the mid-2000s. The tool analyzes Python 2 code and applies a collection of transformation rules to produce Python 3 compatible output. It can write changes in place with the -w option, or print the results to stdout; other options adjust which fixers are applied or control the level of reporting.
The conversion works through a set of fixers located in lib2to3.fixes. Each fixer handles a specific class
Limitations: 2to3 cannot automatically fix all Python 2 code paths or all third-party library dependencies; some