How to run Python script on WindowXP

John Roth newsgroups at jhrothjr.com
Fri Aug 1 06:38:23 EDT 2003


How to run Python script on WindowXPFunny, I works for me. There are two
parts to
the solution. First, check if the Python library is in your path. If
it isn't, you'll get an error that says something like "not an executable
or script."

Go to Control Panel -> System -> Advanced -> Environment Variables,
and you'll be able to set the path properly.

Outside of that, your command needs to be: "python <yourscript>.py
<parameters>"
(without the quotes, obviously.) For example:

python froznitz.py foobar galoshes

I find that a command file (.cmd) to set the
python path first helps. Python, for some reason, does not assume the .py,
you
have to specify it.

John Roth

[original post]
"Yunxian Mak" <yunxian at proteome.org.au> wrote in message
news:mailman.1059704283.30356.python-list at python.org...
Dear Sir/Madam,
I'm doing my PhD in APAF and I installed Python 2.2 interpreter in WindowNT
before and it worked OK on my old computer. However, our company has
upgraded the systems to WindowXP recently. I installed Python2.2.3, which
includes IDLE (Python GUI), Module Docs, Python (command line) and Python
Manuals, on my new computer.  I can open my Python code from IDLE (Python
GUI), but I don't know how to run it. If you could please tell me whether
the Python interpreter compatible to WindowXP and how to run the Python
script on WindowXP, I'll be much appreciated. Thank you very much again.
Best regards,
Yunxian Mak






More information about the Python-list mailing list