views:

191

answers:

4

Is there any tool available to automatically convert Python 2.x scripts to Python 3.x? Or do you still have to convert it manually? 2.x-3.x auto-converter would be really helpful (to everyone else too, I guess).

Ofcourse I'm not looking to convert large programs, just about 8-10 modules.

Thanks

+2  A: 

Yes - its a standard tool :)

jkp
Me too...who downvoted me?!
jkp
+4  A: 

Yes, there is a python script just for this purpose, here is detailed explanation of what it can convert: http://diveintopython3.org/porting-code-to-python-3-with-2to3.html

DoR
Thanks for the link, I had the cached version which isn't quite readable.
Nimbuz
WTH, who downvoted this?
DoR
I up-voted it, so its 0, would've been -1. Yea, not sure why, thanks for the link again.
Nimbuz
Actually, the link you provided had full details. I couldn't have figured it out via the official documentation. Thanks again!
Nimbuz
+3  A: 

Hello,

Try with 2to3: http://docs.python.org/library/2to3.html

Koder_
A: 

Also, for C extensions to Python (slightly different I know but maybe useful to someone looking at this page), there is this.

jkp