I have several python utils that look at sys.argv to get a list of
filenames to process and mangle the files in various ways. If I have a
bar.bat file in Windows XP then I can just drag foo.avi onto bar.bat and
bar.bat gets called with foo.avi as an argument, everyone's happy. But if I
have a bar.py (or .pyw) and try to drag and drop foo.avi to it, I get a big
NO cursor and nothing happens.
Now I can work around this by creating a _bar.bat and having the _bar.bat
call bar.pyw with the filenames it was passed (this is obviously
ridiculous). Or I can create a shortcut which has the target of
c:\python25\pythonw.exe c:\mybar\bar.pyw
and that works, but makes telling people how to install my utilities on
their computer a pain in the rear. It's just a little weird that I can't
just drag and drop file names onto .pyw or .py files. Am I missing
something here?
Thanks for any help.