I thought this would be easy, but I've been struggling for a while.
I have a Python script on my Windows machine called "myscript.py". I have it in a folder that's on my PATH, and I've added the ".py" extension to the PATHEXT environment variable, so I can run my script from a command prompt by just doing "myscript" (instead of typing "myscript.py"). This is working fine.
However, I cannot seem to get the same behavior when launching my script from the "Run" prompt (Windows-R). If I type "myscript.py" it works fine, but just doing "myscript" doesn't - I get the Windows cannot find 'myscript'...
error message.
I would have assumed that the "Run" prompt simply doesn't recognize the PATHEXT variable, but other types of programs seem to work - I can run .bat (Windows batch scripts) and .exe (Windows executables) from the Run prompt without any extension needed.
Why doesn't running my Python script without an extension work from the Run prompt?