On Apr 10, 2:03 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > under windows I tried to make a shortcut to a py -file, to run a program. > So making a shortcut like this works perfect: > D:\PyLab_Works.py > > But the problem is that I need to give some commandline parameters to > the py-file, > and > > D:\PyLab_Works.py btc_test > But the parameter doesn't seem to arrive in the python program > > If I start with the python interpreter, the parameters do arrive at the > program > P:\pythonw.exe D:\PyLab_Works.py btc_test > Although this method works, > it makes the creation of shortcuts difficult (the paths are in real much > longer). > > Is there a way to pass the commandline parameters correctly, > without explicitly specifying the python interpreter ? > > thanks, > Stef Mientki
I'm not sure what you're doing wrong. It works for me. I do have Python on my system path though. I did this: Created a shortcut to my script (test.py). Right-clicked it and chose Properties. Changed it to look like this: C:\Python25\test.py -i Pressed Ok and ran it. It received my parameter just fine. If you want to use pythonw.exe by default, you'll want to change the extension of your script to *.pyw Mike -- http://mail.python.org/mailman/listinfo/python-list