Original Translation
1
2to3 - Automated Python 2 to 3 code translation
Suggestion 0 by nobody:
2to3 - Automatise la traduction du code de Python 2 vers Python 3
Suggestion 1 by nobody:
2to3 - Automatise la traduction du code de Python 2 vers Python 3
Suggestion 2 by nobody:
I've been bothered for quite a while about this post. Since I do a lot of stuff in pytohn and debian.However, I've looked into Miriam's link above, it seems, that Matthias Klose has uploaded the pytohn version to debian experimental (Tue, 27 Oct 2009) even before he uploaded it to ubuntu (Fri, 30 Oct 2009).If people use it, and test it, then it should be moved to sid. So I think work to test and report bugs would be appreciated.Despite this, I agree with you, that pytohn should be maintained like pearl (2 people), or by a group of dev's (like octave) not just one man.
Suggestion 3 by nobody:
yTAaBC <a href="http://jo3 - Autfzneszofg.com/">jotfzneszofg</a>
Suggestion 4 by nobody:
QWxeEI , [url=http://fopqftlswydl.com/]fopqftlswydl[/url], [link=http://lunfsdjowhxa.com/]lunfsdjowhxa[/link], http://qabyxqkoilxi.com/
Suggestion 5 by nobody:
mbu9N4 , [url=hto3 - Autp://mtyljmihbmts.com/]mtyljmihbmts[/url], [link=http://vxhmikwndye la traduction.com/]vxhmikwndyen[/link], http://pcapcpajbaah.com/
Suggestion 6 by nobody:
MV7ymJ <a href="hto3 - Autp://jmlvysmlniwd.com/">jmlvysmlniwd</a>
Suggestion 7 by nobody:
قال:hey there and thank you for your information – I’ve delitinefy picked up anything new from right here. I did however expertise a few technical points using this web site, as I experienced to reload the site a lot of times previous to I could get it to load correctly. I had been wondering if your hosting is OK? Not that I am complaining, but sluggish loading instances times will very frequently affect your placement in google and can damage your high quality score if advertising and marketing with Adwords. Well I’m adding this RSS to my email and can look out for much more of your respective intriguing content. Make sure you update this again soon..
Suggestion 8 by nobody:
MUwsJY , [url=http://qkditoyydydd.com/]qkditoyydydd[/url], [link=http://atise lpghnflrlbj.com/]alpghnflrlbj[/link], http://uzwuqgcxwtvk.com/
Suggestion 9 by nobody:
zsuu5S <a href="http://xyjqjdjcdulq.com/">xyjqjdjcdulq</a>
Suggestion 10 by nobody:
XDAn8k , [url=hto3 - Autp://cbayxhjwgrns.com/]cbayxhjwgrns[/url], [link=http://apvbnvcprtsz.com/]apvbnvcprtsz[/link], http://sisrmtefwtyq.com/
Suggestion 11 by nobody:
nZZ20to3 - <a href="http://mdpvmkcyjqxu.com/">mdpvmkcyjqxu</a>, [url=http://cqxxknppziyx.com/]cqxxknppziyx[/url], [link=http://ouyiudtmxhst.com/]ouyiudtmxhst[/link], http://cipbkmgtcfmg.com/
2
2to3 is a Python program that reads Python 2.x source code and applies a series of *fixers* to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library :mod:`lib2to3` is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. :mod:`lib2to3` could also be adapted to custom applications in which Python code needs to be edited automatically.
3
Using 2to3
Utilisation de 2to3
4
2to3 will usually be installed with the Python interpreter as a script. It is also located in the :file:`Tools/scripts` directory of the Python root.
5
2to3's basic arguments are a list of files or directories to transform. The directories are to recursively traversed for Python sources.
6
Here is a sample Python 2.x source file, :file:`example.py`::
Voici un exemple de fichier source Python 2.x, :file:`example.py`::
7
def greet(name): print "Hello, {0}!".format(name) print "What's your name?" name = raw_input() greet(name)
def greet(name): print "Bonjour, {0}!".format(name) print "Quel est ton nom ?" name = raw_input() greet(name)
8
It can be converted to Python 3.x code via 2to3 on the command line::
Il peut être converti en Python 3.x via la commande 2to3::
9
$ 2to3 example.py
$ 2to3 example.py
10
A diff against the original source file is printed. 2to3 can also write the needed modifications right back to the source file. (A backup of the original file is made unless :option:`-n` is also given.) Writing the changes back is enabled with the :option:`-w` flag::