Windows and python execution
Bengt Richter
bokr at oz.net
Mon Dec 26 16:50:21 EST 2005
On Mon, 26 Dec 2005 14:53:28 +0000, Mark Carter <me at privacy.net> wrote:
>rzed wrote:
>> Mark Carter <me at privacy.net> wrote in
>> news:43afdec0$0$15788$14726298 at news.sunsite.dk:
>>
>>
>>>What I would like to do it type something like
>>>
>>>>myscript.py
>>>
>>>instead of
>>>
>>>>python myscript.py
>
>> As another poster points out, be sure that your Python is on your
>> path.
>>
>> And there is a PATHEXT environment variable,
>
>Aha. You'bve provided a significant clue.
>
>What you need to do is include the following line in autoexec.bat:
>set .py=c:\python24\python.exe
>
>This will achieve the desired result. I'm suprised more people don't use it.
I wasn't aware of that syntax for set. What OS/platform/shell is that from?
How did you go from the PATHEXT "clue" to the set command you specify and decide
not to set pathext, e.g., by something like
set PATHEXT=%PATHEXT%;.py
Does your set do the pathext and assoc and ftype all in one swell foop?
Regards,
Bengt Richter
More information about the Python-list
mailing list