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?
Asked
Active
Viewed 1,505 times
3

drevicko
- 14,382
- 15
- 75
- 97
-
3I think one runs using Python 2.7 and the other runs using 3.1 – Blender Jul 18 '12 at 02:34
-
`(2to3 - 2.7) - (2to3 - 3.1)` is `-0.4` .... HTH :-) – Stephen C Jul 18 '12 at 02:38
-
Um... One converts from `v2` to `v3-2.7` and the other converts from `v2` to `v3-3.1`? – Ken White Jul 18 '12 at 02:40
-
One is version 2.7 and the other is newer than that? Why not download the source and check the release notes? – stark Jul 18 '12 at 02:51
-
1As an aside: Ubuntu 12.04 should have `2to3-3.2`, not 3.1. – Thomas K Jul 18 '12 at 12:04
-
seems my update mirror hasn't put python 3.2 up yet. Waiting waiting waiting! – drevicko Jul 19 '12 at 03:08
1 Answers
8
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.

Ned Batchelder
- 364,293
- 75
- 561
- 662