[Tutor] help with getting python to run from command prompt onWindows XP

Marc Tompkins marc.tompkins at gmail.com
Thu Jan 15 18:54:29 CET 2009


On Thu, Jan 15, 2009 at 9:35 AM, Dj Gilcrease <digitalxero at gmail.com> wrote:

> if he just needs to run python scripts you just need to type the
> script name (preferably from the directory it is in)
>
> eg: C:\Path\To\App>app_name.py
>
> and it will run
>

By default, and on most people's machines, not true.  You can double-click
on a .py script from the GUI, and if your file associations are set
correctly then Python (or PythonW) will be invoked - but from the command
line, not so much.

HOWEVER:  if you add ";.PY;.PYW" to the end of your PATHEXT string, then
this will work.  (Just tried it out on my machine and wonder why I never did
before.)

Unfortunately, this still requires that Windows be able to find "python.exe"
or "pythonw.exe" in the system path... so it's nifty, but doesn't solve the
OP's problem.


-- 
www.fsrtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090115/b1ab39bd/attachment.htm>


More information about the Tutor mailing list