On Jan 14, 10:01 pm, marco.m.peter...@gmail.com wrote:
> I have Python 3.0. I tried to use the 2to3 program included with the
> interpreter to convert some scripts for Python 2.5 to Python 3.0 ones.
> When I try to start it form the Python command line, it says it is a
> syntax error.
>
> This was the line of code:
>
> $ 2to3 testscript.py
>
> Any help would be appreciated.
>
> Thanks
> - Marco

Sorry to bring this back up. I'm a newbie trying to run 2to3 on
Windows. I ran the following:

C:\Python30\python.exe C:\Python30\Tools\Scripts\2to3.py c:\python\src
\testscript.py

and I got the following:

C:\Users\user>C:\Python30\python.exe C:\Python30\Tools\Scripts\2to3.py
c:\python\src\testscript.py
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
--- c:\python\src\testscript.py (original)
+++ c:\python\src\testscript.py (refactored)
@@ -1,3 +1,3 @@
 #! /usr/bin/python

-print "Hello World";
+print("Hello World");
RefactoringTool: Files that need to be modified:
RefactoringTool: c:\python\src\testscript.py

what am I suppose to do after that? I thought it would re-write my
testscript.py but it didn't. Thanks so much for the help.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to