Syntax Error

Terry Reedy tjreedy at udel.edu
Sat Mar 19 17:31:16 EDT 2011


On 3/19/2011 2:07 PM, Manatee wrote:

> C:\Users\Rivetmr\MyPythonScripts>Python
> Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit
> (AMD64)] onI
> win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>>
>
>
> I guess I have to go to an earlier version; maybe 2.6?

No reason to think that. 2.7 is not much different.
I suggest that you comment out the print line (add # to beginning) to 
see if the syntax error is really in the print line or if there there is 
a previous error which is only caught on that line. Also try moving the 
line to a different place (and adjusting indent as necessary) to see 
what happens. Debugging is often a matter of trying different things to 
collect more bits of information. Python, especially with IDLE or other 
editor with a Run key, make that especially easy.

-- 
Terry Jan Reedy




More information about the Python-list mailing list