Python in command line runs the wrong version?

You need to update the .py extension in the registry editor. Search for the ".py" extention and look at what the (Default) key points too. It's probably in:

HKEY_CLASSES_ROOT/.py/(Default)

The "Data" of this key is probably "Python.File" (see the screenshot below). enter image description here

Use this too look up a second key:

HKEY_CLASSES_ROOT/<previous_keys_data>/shell/open/command/@default
e.g.
HKEY_CLASSES_ROOT/Python.File/shell/open/command/@default

The (Default) key contains the path to the Python interpreter that will be used. Update it as required to point to the one you want to use. (see screenshot) enter image description here

Background

The Python interpreter chosen on the command line only uses the PATH environment variable if you actually specify the python executable. i.e.

python myProgram.py

Without actually including "python" the command shell will attempt to find a program to open .py files (the first key above).

It will then use this key to find an appropriate program (the second key).

As @efotinis said, you can determine the interpreter being used using the simple program:

import sys
print sys.executable

Try executing this with both of the following to see the difference between using PATH to find the executable you specified and using the command interpreter to find a program to open the .py file you specified.

python myProgram.py
myProgram.py

While you're in a Python 2.4.5 session, use this to locate the Python.exe that gets picked up:

import sys
print sys.executable

If you want to play with multiple versions, you cannot rely on %PATH%. Instead you could create separate batch files that call the version you want (make sure the batch files themselves are on the PATH though). For example, for 2.7.2 you could create a PY27.BAT that simply contains:

@C:\Python27\Python.exe $*