[Tutor] Problem with running Python

Steve Willoughby steve at alchemy.com
Fri Apr 22 19:44:39 CEST 2011


On 22-Apr-11 07:13, Alex Butler wrote:
> Hello all,
>
> I am new to programming on Python and am teaching myself. I have figured

Hi, Alex, welcome to programming and the Python language.

If you want to get the most out of this list, it helps to ask very 
specific questions, showing what you have tried so far to figure out 
your problem, with what results.

Including examples of your actual code and actual error messages is 
enormously helpful.

> out some basics of coding, however whenever I try to run the program or
> check its functionality (Alt + X on my windows) it always comes back
> saying that “there’s an error in your program: invalid syntax.” However,
> when it returns to the IDLE page and highlights the error, it highlights
> the 7 in the python 2.7.1 above any coding. And if I am able to delete
> that text, it then links the syntax error to the multiple ‘>’ in the
> code. Is this a common issue with a simple fix? Thanks

It sounds to me like you're confusing the actual program code with other 
stuff like the >>> prompt Python's interpreter types to you.  Are you 
cutting and pasting more into IDLE than the Python program code itself?

You should not have things like "Python 2.7.1" or ">>>" showing up in 
your source code.

-- 
Steve Willoughby / steve at alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C


More information about the Tutor mailing list