Recently, I ran into some trouble with a program for Steam that I was modifying that was written in Python 2. I had to change the old Python 2 code throughout the program. That can be long and tedious changing the syntax throughout the program. Luckily Python 3 comes prepackaged with a built in module just for that function.
The 2to3 standard module is just that module
run in terminal to convert Python 2 code to Python 3:
2to3 -w -n /Users/joshosborne/Documents/example/example.py
“-w” denotes to overwrite the original file with the changed file.
If you don’t use “-w” as an argument, it will just print what it will change.
“-n” denotes to not save a backup of the original file being modified.
You can pass any number of arguments found in the 2to3 documentation. But, more than likely, you will use these commands the majority of the time.