do not know what is wrong python under win2k

Steve Holden sholden at holdenweb.com
Mon Dec 17 17:59:37 EST 2001


"Tom Karas" <Tom.Karas at htp-tel.de> wrote in ...
> Hello folks,
>
> i went to the libary to get a copy of "Learning Python" where it
> is written that i should write:
>
> import sys
> print sys.argv
>
> into a file called "spam.py" and after that i should do the following:
>
> >>> python spam.py -i eggs -o bacon
>
> but i got the following error
>
> Traceback (  File "<interactive input>", line 1
>     python spam.py -i eggs -o bacon
>                       ^
> SyntaxError: invalid syntax
>
> although i saved the file "spam.py" into the same directory where the
> python.exe is located.
>
> What did i made wrong - i am conviced i did exactly like it was written
> in the book.
>
The line you entered into the Python interpreter should by typed to your
operating system's command interpreter (in Windows, in a command window at
the ">" prompt).

regards
 Steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list