Search code examples
pythonpython-3.xpython-2.7ubuntu-12.04python-2to3

What's the difference between 2to3-2.7 and 2to3-3.1?


My Ubuntu 12.04 stock python install has 2 programs for converting code to Python 3.x: 2to3-2.7 and 2to3-3.1. What's the difference?


Solution

  • They are both 2to3, but one is part of your Python 2.7 installation, and the other is part of your Python 3.1 installation.

    If you look at the bin directory in a Python X.Y installation, each foo executable will also be named foo-X.Y, so that you can run a specific version by name.