Welcome, guest | Sign In | My Account | Store | Cart
My original PATHEXT variable. 

M:\>echo %PATHEXT%

Using Control Panel -> System -> Advanced -> Environment Variables, I edited this and added .PY.

M:\>echo %PATHEXT%

I have M:\bin in my PATH as well, so now DOS just finds the commands.

M:\>type bin\pytest.py

import sys

print "Hello from MS Windows:", sys.getwindowsversion()

Hello from MS Windows: (5, 1, 2600, 2, 'Service Pack 2')