How do you change file associations for .py Python files in XP?

When I type assoc .py, I get .py=py_auto_file. When I type ftype py_auto_file, I getpy_auto_file="C:\Program Files\Adobe\Photoshop 7.0\Photoshop.exe" "%1"

How to py_auto_file="C:\Python27"do

+5
source share
3 answers

It looks like Photoshop can recognize the .py file format and associated “py_auto_file” with the .py extension.

You can use the following command to search for python file types:

C:\>ftype | findstr -i python
Python.CompiledFile="C:\Python27\python.exe" "%1" %*
Python.File="C:\Python27\python.exe" "%1" %*
Python.NoConFile="C:\Python27\pythonw.exe" "%1" %*

The following command shows the correct associations from my system:

C:\>assoc | findstr -i python
.py=Python.File
.pyc=Python.CompiledFile
.pyo=Python.CompiledFile
.pyw=Python.NoConFile

You can establish associations with the following commands:

assoc .py=Python.File
assoc .pyc=Python.CompiledFile
assoc .pyo=Python.CompiledFile
assoc .pyw=Python.NoConFile
+11
source

script %1 %* Python27.

ftype py_auto_file="C:\Python27\bin\python.exe" "%1" %*
+4

Right click on the .py file and install the default program as python.exe

0
source

All Articles