tirsdag 22. september 2009

Python programs not receiving arguments under windows

Odd problem, but when trying to run python programs under windows none of the programs seemed to receive any of the input arguments. Searching the web I found a lot of advanced solutions to this (involving our beloved registry), but the answer turned out to be rather simple. When I finally found it of course.


So here goes:



  • Under Explorer go to Tools -> Folder Options.

  • Select the 'File Types' tab.

  • Find PY and click 'Advanced'.

  • Edit the open action and enter: "D:\Python26\python.exe" "%1" %*

  • Done!


Of course if you happen to have installed python.exe somewhere else then change to that.


No registry editing, no downloading programs to fix this. Simple solution.

Ingen kommentarer:

Legg inn en kommentar