Tuesday, December 16, 2008

.py association in Vista/Windows Missing

I was playing  with version 2.6 Python without uninstalling version 2.5. 
And for some reason i realize that when i execute a module without specifying the python.exe, the module could not get the arguments that was passed in.
For eg.

test.py argument1 argument 2
(argument1 and argument2 is missing from the sys.argv)

But
python test.py argument1 argument2 : works

Initially i tried "assoc .py" followed by "ftype Python.File" and the association was CORRECT!
It shows : Python.File="C:\Python26\python.exe" "%1" %*

Later i found out it was because there is still a registry key that is mapping wrongly.
Changing that registry key solves the problem.

Refer to the picture.





No comments:

Post a Comment