sholden at holdenweb.com
Wed Oct 31 17:28:57 CET 2001
" 1" <jnlc at bellsouth.net> wrote ...
> I must have missed it in the tutorial or some thing.
> I want to know how to open and run a file in python. The tutorial said to
> just type " python filename.py" and hit enter. I did this and it comes
> with an error message telling me the the file name is not defined. I
> told that I had to define it first before I can run it. Is there an easier
> way to run files otherthan defining them?
OK. When asking for help, it's usually a good idea to give more rather than
less information, since you may not know what's going to be useful to the
In this case I am assuming that the file name that is "not defined" is
python -- in other words, that when you type
the system can't find the Python interpreter, rather than the system is
running Python which then cannot find filename.py. If this is the case then
you are going to have to tell your command line interpreter (the Unix shell,
or the NT/W98/W95/W2k cmd.exe program) how to find Python. This will involve
modifying your "path setting".
If this doesn't help you enough, perhaps you could let us see the exact
error message, and tell us which OS you are using?
More information about the Python-list