[Tutor] can't run script

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Fri Jan 31 01:04:02 2003


On Tue, 28 Jan 2003, Mike Cluster wrote:

> I am new to both programming and python, but I've been able to work in
> interactive mode and make some progress. However I am unable to save and
> "run script"- every time I try I get an "invalid syntax" error message.

Hi Mike,

When Python says "Invalid syntax", it means that the program doesn't quite
know what to make of it.  *grin* But don't worry; that's what we're here
for.


We need to see what you've typed to better understand the problem.  Can
you cut and paste your program and send it to the Tutor list?  You can
copy it directly into the email body: we can take a look and see what's
going on.  Also, there should have been a few lines of error message right
above the "Invalid syntax" part --- can you send those lines over as well?


> None of the tutorials seem to address this or anticipate it as a
> problem.????????????? mike

I wrote a tutorial on IDLE that does mention that SyntaxErrors can
happen:

    http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/

As you learn more of the language, syntax errors will be easier to figure
out.  Since you're new to the language, please feel free to show us on the
Tutor list; we'll be happy to interpret the errors for you.


Good luck!