1
0
I just (finally!) upgraded Python from 2.6 to 2.7, and also installed 3.2 in parallel. I am running Windows Vista.
Before, I could drag-and-drop onto a .py file to run the script, with the dragged file's name appearing in sys.argv
. I did nothing to get this behaviour; it worked as soon as Python 2.6 was installed.
It no longer works: the .py file is not recognized as a valid drop target.
I tried this registry hack, which I also found by searching on Google (getting a few scattered references, including an old mailing list thread on python.org). It accomplished exactly nothing, even after restarting the computer. I also shouldn't have to do this anyway, since I didn't have to last time.
What is going on? How can I fix it? I really miss having this behaviour.
What did you drag and drop onto the .py? – Paul – 2011-12-08T01:47:51.253
A plain text file, which the .py is meant to open and read. Previously, the path to the dropped file was supplied in
sys.argv
. – Karl Knechtel – 2011-12-08T02:25:12.890If you drop text files in a .exe icon, does it run the .exe? People were probably using this as an attack vector and so Microsoft decided to remove the feature in some update. – gcb – 2011-12-10T05:23:20.527
drag-and-drop to an .exe works fine. I haven't heard of any such lockdown, either. – Karl Knechtel – 2011-12-13T19:20:07.753