Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
703 views
in Technique[技术] by (71.8m points)

cmd - How do you change file association 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 get py_auto_file="C:Program FilesAdobePhotoshop 7.0Photoshop.exe" "%1"

How do I make py_auto_file="C:Python27"?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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:Python27python.exe" "%1" %*
Python.File="C:Python27python.exe" "%1" %*
Python.NoConFile="C:Python27pythonw.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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...