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
302 views
in Technique[技术] by (71.8m points)

python - "Edit with IDLE" option missing from context menu

I have Python 2.7.5 that installed with ArcGIS 10.2.2. When I first right-clicked a .py script I'd previously written it listed the "Edit with IDLE" option in the context menu. However, this option no longer appears when I right-click a .py file.

I have read numerous threads concerning this issue and attempted some of them, such as modifying/removing registry keys and then reinstalling/repairing the software. I am not interested in using an IDE at this point, though many will be happy to know I intend to use an IDE later on. Right now, the purpose is to fix the problem rather than avoid and work around it.

I appreciate the help I've gotten from the online community in the past, and I'm confident someone will come through with a solution for me.

How do I get "Edit with IDLE" back in the context menu?

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

Most of the time when this problem occurs, people will read answers directing them into the windows registry, often unnecessarily.

In the majority of cases, the registry key

HKEY_CLASSES_ROOTPython.FileshellEdit with IDLEcommand

will already exist and have the correct value, but it will only be used by Windows shell context menu if .py files are set by default to open with python.exe.

This is the first thing to check, and solves the problem in the majority of cases:

  • right click on a .py file
  • open with...
  • choose default program...
  • tick always use the selected program to open this kind of file
  • choose python.exe

This runs the script in a terminal, but also sets the filetype back to python.

Now check the right click menu again.


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

...