Using the Python interpreter
Michael Hoffman
cam.ac.uk at mh391.invalid
Wed Apr 18 21:27:56 EDT 2007
tkpmep at hotmail.com wrote:
> Instead of starting IDLE as I normally do, I started the Python
> interpreter and tried to run a program. I got a Python prompt (>>>),
> and then tried unsuccessfully to run a Python script named Script1.py
> that runs perfectly well in IDLE. Here's what I did:
>
>>>> Script1.py
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> NameError: name Script1 is not defined
>
>>>> python Script1.py
You need to do this from a Windows command line, not from Python.
C:\Python25>python Script1.py
Hello, world!
--
Michael Hoffman
More information about the Python-list
mailing list