您如何在XP中更改.py Python文件的文件关联? [英] How do you change file association for .py Python files in XP?
问题描述
当我键入 assoc .py
时,我得到 .py = py_auto_file
。
当我键入 ftype py_auto_file
时,我得到 py_auto_file =C:\Program Files \Adobe \Photoshop 7.0 \Photoshop。 exe%1
如何使 py_auto_file =C:\Python27$ Photoshop可能会识别.py文件格式,并将py_auto_file与.py文件关联起来。c / c>
扩展。
您可以使用以下命令查找python文件类型:
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%*
下一个命令显示我的系统正确的关联:
C:\ > assoc | findstr -i python
.py = Python.File
.pyc = Python.CompiledFile
.pyo = Python.CompiledFile
.pyw = Python.NoConFile
您可以使用以下命令修复关联:
assoc .py = Python.File
assoc .pyc = Python.CompiledFile
assoc .pyo = Python.CompiledFile
assoc .pyw = Python.NoConFile
When I type assoc .py
I get .py=py_auto_file
.
When I type ftype py_auto_file
I get py_auto_file="C:\Program Files\Adobe\Photoshop 7.0\Photoshop.exe" "%1"
How do I make py_auto_file="C:\Python27"
?
解决方案 It appears Photoshop may recognize a .py file format and has associated "py_auto_file" with the .py extension.
You can use the following command to locate the 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 next 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 fix the associations with the following commands:
assoc .py=Python.File
assoc .pyc=Python.CompiledFile
assoc .pyo=Python.CompiledFile
assoc .pyw=Python.NoConFile
这篇关于您如何在XP中更改.py Python文件的文件关联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!