New guy question

Alex new_name at mit.edu
Sat Jun 9 20:03:23 EDT 2001


> However, when I go to the console and enter python alook.py, I get an error
> message:
> 
> >>> python alook.py
> SyntaxError: invalid syntax

Based on the '>>>' prefix It looks like you're entering this into the
python interpreter.  In that context, to get the same behaviour, you
would probably want to do something like "execfile('alook.py')"  Try
running "python alook.py" from the shell/dos command prompt, instead.
It might be helpful to work through a tutorial.  The one at
www.python.org/doc/tut is pretty good, imo.

Alex.




More information about the Python-list mailing list