Try this script, it comes with your Python 3 installation: http://docs.python.org/library/2to3.html
You may have to review the source code manually in non trivial cases, though. Regards, -Mario On Thu, Jan 7, 2010 at 2:40 AM, Santosh Mohan <santosh....@gmail.com> wrote: > HI, > > I installed new version of Python 3.1. I tried to run my older programs, > but I couldn't run. > > I had used "print" statements, in Newer version print statement syntax is > changed. > > Python2.x > >>>x=20 > >>>print x > >>> 20 > > Python 3.x > >>>x=20 > >>> print x > File "<stdin>", line 1 > print x > ^ > SyntaxError: invalid syntax > >>>print(x) > >>>20 > > Is there any utility for running the older version programs? > > > Regards, > Santosh M > > _______________________________________________ > python-win32 mailing list > python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 > > -- HONEY: I want to… put some powder on my nose. GEORGE: Martha, won’t you show her where we keep the euphemism?
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32