Windows XP - cron or scheduler for Python?

Peter Hansen peter at
Mon Jun 21 19:35:10 CEST 2004

Ivan Voras wrote:

> Peter Hansen wrote:
>> Larry Bates wrote:
>>> 2) Always call Python and have it run the application.
>>> Don't just try to run
>> This actually works, though, at least on my system.  It
>> might be because I inserted .py in the PATHEXT env var
>> globally, though I thought it was just because running
>> a .py is possible simply by clicking on it in Explorer
>> (ie. the File Association does the job).
> No, putting .py in PATHEXT is necessary. That way, you can run python 
> programs from the command line (cmd) using just "scriptname", without 
> the extension! (it performs just like .bat, .exe and similar files)

Are you sure?  I just tried removing .py from my PATHEXT and
not only did it still work from Explorer, it even worked from
the command line!

Then I tried redirecting the File Assocation under File Types
to point to notepad instead of python.  Now typing ""
at the command line or clicking on the file in
Explorer both launch Notepad to edit the file.

I'm not sure what PATHEXT is really needed for, but executing
.py files on the command line in Windows XP does not seem to
be one of them...


More information about the Python-list mailing list