-
-
Save GenevieveBuckley/76ce466e744321514894cf12dcae6c0c to your computer and use it in GitHub Desktop.
Converting python 2 code to python 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For the whole repository: | |
$ 2to3 --output-dir=python3-version/mycode -W -n python2-version/mycode | |
For a single file: | |
$ 2to3 filename.py | |
# See details at: | |
# https://docs.python.org/2/library/2to3.html | |
# Stack overflow | |
# https://stackoverflow.com/questions/20458011/how-to-use-2to3-properly-for-python |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment