[Python-ideas] Windows temporary file association for Python files

anatoly techtonik techtonik at gmail.com
Mon Oct 22 12:51:52 CEST 2012

I wonder if it will make the life easier if Python was installed with
.py association to "%PYTHON_HOME%\python.exe" "%1" %*
It will remove the need to run .py scripts in virtualenv with explicit
'python' prefix.

Example how it doesn't work right now

E:\virtenv32\Scripts>echo import sys; print(sys.version) > test.py

3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)]

E:\virtenv32\Scripts>python test.py
3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)]

If Python file association was specified with
"%PYTHON_HOME%\python.exe" "%1" %* then virtualenv could override this
variable when setting the environment to set correct executable for
.py files.
anatoly t.

More information about the Python-ideas mailing list