(In windows)
I have both Python 2.6 and 2.4 installed on a machine (for testing purposes). When I open a cmd and type python I get:
C:\>python
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
However, when I create a file named test.py with contents
import sys
print(sys.version)
It displays:
C:\temp>test.py
2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]
Why would this be? I've checked my path and I have c:\python26 in there. It seems .py files are associated with python 2.4. I would expect that to by an environment variable, but I don't see it anywhere. I did install 2.4 after 2.6, so this makes some sense, but is there a list somewhere of what filetypes are associated with what executables?