Chris Angelico wrote:
There's a specific search order. Back in the days of DOS, it was simply "com, then exe, then bat", but on modern Windowses, I think it's governed by an environment variable.
You probably mean '%PATHEXT'. Mine is: .COM;.EXE;.BAT;.BTM;.CMD;.JS;.JSE;.WSF;.WSH;.MSC;.tcl;.py;.pyw;.pl;.htm;.html In my favourite shell 4NT, I simply can have: set .py=python Instead of the Explorer associations that the Python-installer puts in my registry. Revealed from my shell: c:\> assoc .py .py=py_auto_file c:\> ftype py_auto_file py_auto_file="F:\ProgramFiler\Python27\python.exe" "%1" In ShellExecuteEx(), what program gets launched for "py_auto_file" in this case, seems to be determined by the 'SHELLEXECUTEINFO:lpClass' member. I fail to see that Python uses this structure anywhere. -- --gv -- https://mail.python.org/mailman/listinfo/python-list