[Tutor] A newbie question about running python scripts
ZIYAD A. M. AL-BATLY
zamb at saudi.net.sa
Thu Jun 16 16:55:36 CEST 2005
On Thu, 2005-06-16 at 07:23 -0700, typetext wrote:
> Thank you for responding. Here is what happens when I type python
> helloworld.py without any quotation marks into the command line:1.
> The prompt line reads
> 1.C:\Documents and Settings\Micky
> 2. I type "python"
> 3. the python prompt comes up Active Python 2.4.1
> 4. then I type "helloworld.py"
> 5. Then I get " Traceback (most recent call last)
> > > File "<stdin>", line 1 in ?
> > > NameError:name 'helloworld' is not defined"
> Do you have any ideas on this? It looks to me as if that ought to
> work, but it doesn't. I would really appreciate some help. Perhaps I
> need to put in a file path name, or reinstall Python 2.4.1?
> Michael Riggs
No. You don't need to go into Python's interactive shell (the one with
the ">>> " prompt) to run the script. Just type the following two lines
cd "C:\Documents and Settings\Micky"
And that's all!
Tell us what you get.
More information about the Tutor