Mark Carter <[EMAIL PROTECTED]> wrote:

>rzed wrote:
>> Mark Carter <[EMAIL PROTECTED]> wrote in
>> news:[EMAIL PROTECTED]: 
>> 
>> 
>>>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.

They don't use it, because it doesn't do anything.  I'd be interested to
know where you read that.

What the OP needs is this:

   assoc .py=Python.File
   ftype Python.File="c:\Apps\Python24\python.exe" "%1" "%*"
   assoc .pyw=Python.NoConFile
   ftype Python.NoConFile="c:\Apps\Python24\pythonw.exe" "%1" "%*"

Substitute your own Python path.

The Python .msi installer DOES do this, if you let it do its default thing.
You should check whether these are already set up, by doing this:

   assoc .py
-- 
- Tim Roberts, [EMAIL PROTECTED]
  Providenza & Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to