Re: win-shortcuts, file associates and command-line parameters ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stef Mientki

    Re: win-shortcuts, file associates and command-line parameters ?

    Gabriel Genellina wrote:
    En Thu, 10 Apr 2008 16:03:28 -0300, Stef Mientki <stef.mientki@g mail.com>
    escribió:
    >
    >
    >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
    >>
    >
    Check the associated command for .py files; see this message

    >
    >
    Didn't work for me winXP-SP2, even after a restart :-(
    But anyway thanks for the effort.

    cheers,
    Stef Mientki
  • Mike Driscoll

    #2
    Re: win-shortcuts, file associates and command-line parameters ?

    On Apr 11, 4:40 pm, Stef Mientki <stef.mien...@g mail.comwrote:
    Gabriel Genellina wrote:
    En Thu, 10 Apr 2008 16:03:28 -0300, Stef Mientki <stef.mien...@g mail.com>
    escribió:
    >
    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
    >
    Check the associated command for .py files; see this message
    http://groups.google.com/group/comp....6ba14ae4fa57e3
    >
    Didn't work for me winXP-SP2, even after a restart :-(
    But anyway thanks for the effort.
    >
    cheers,
    Stef Mientki
    You could try uninstalling Python and reinstalling it. Or you could do
    a registry hack.

    I did a search for what Gabriel was talking about and it looks like
    the key you want is found here:

    HKEY_LOCAL_MACH INE\software\cl asses\applicati ons\pythonw.exe \shell
    \Edit with IDLE\command

    Mine has the following for its value:

    "L:\Python24\py thonw.exe" "L:\Python24\Li b\idlelib\idle. pyw" -n -e
    "%1" %*

    Make sure that the type is REG_SZ.

    As always, unless you know what you're doing, back up the registry (or
    create a restore point) before messing with it. However, I think the
    only thing that this hack could possibly do is mess up your Python
    install more if it was screwed up.

    Mike

    Comment

    Working...