
December 24th, 2012, 04:22 AM
|
 |
Contributing User
|
|
|
|
|
2to3
The most likely problem is print.
In python3 print is a function, not a statement.
print 'my string'
is a python 3 syntax error just as is
math.sin math.pi/3
raw_input no longer exists in python3, although that wouldn't cause syntax error.
Use python's 2to3 tool to convert your program from version 2 to version 3. The program handles most everything. On my system (shell prompt "$ " it is)
$ 2to3-2.7 --help
I've only used it once myself, but then again I started using python3 while it was an early beta release.
__________________
[code] Code tags[/code] are essential for python code!
|