On 25/11/11 12:42, nikunj.badja...@emc.com wrote:

I had Python27 and Python32 both installed togethar.
In Windows the PATH env variable, I had set Python27 exe and lib path.

But When I do
C:\>  Python  [PressEnter]
I get 2.7

But when I run
C:\>  script.py  [PressEnter]
The script is running with Python3.2 ,
> thts weird because I have set my Path variable with Pytho27 exe

This is one of the annoying ambiguities of Windows.
The way it finds the executable for executables(exe, bat cmd etc) is different to how it finds the executable for associations.

In the former case it uses PATH, in the latter it relies on the file association set in the file properties.

When you install a new Python it  tends to set itself as
the default interpreter for .py files.

Annoying,

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to