sys.argv problem in Win 2k
Bengt Richter
bokr at oz.net
Sat Apr 26 13:27:44 EDT 2003
On 26 Apr 2003 04:24:02 -0700, abpillai at lycos.com (Anand B Pillai) wrote:
>Well I was hoping that would fix it!
>I tried
>
>Python.File=D:\Python22\python.exe "%1" %*
>and
above should work IF assoc .py => .py=Python.File
If assoc .py => .py=someOtherName
check ftype someOtherName and see if the %* is left off.
>Python.File=D:\Python22\python.exe "%*"
above should fail to work
>and another 2 combinations,
>
>But still I cannot pass the cmd line arguments!
>Let me try and figure out myself :-O
Maybe you have a different association via .py -- e.g., I don't have the dotted name:
[10:28] C:\pywk\clp>assoc .py
.py=Pythonfile
[10:28] C:\pywk\clp>ftype Pythonfile
Pythonfile=d:\python22\python.exe "%1" %*
>
>ABP
>Duncan Booth <duncan at NOSPAMrcp.co.uk> wrote in message news:<Xns9368583183AC8duncanrcpcouk at 127.0.0.1>...
>> I wrote:
>> >> D:\temp>ftype Python.File
>> >> Python.File=D:\Python22\python.exe "%1" %*
>>
>> abpillai at lycos.com (Anand B Pillai) wrote in
>> news:bd993a2f.0304242310.586305df at posting.google.com:
>>
>> > F:\users\anand\LocalWorkspaces\ResModWS>ftype Python.File
>> > Python.File=D:\Python22\python.exe "%1"
>> >
>>
>> Spot the difference.
>>
>> The "%1" passes the name of the script to python.exe, the %* passes all the
>> other arguments. Without the %* windows will simply drop the other
>> arguments on the floor.
Regards,
Bengt Richter
More information about the Python-list
mailing list