Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Edit with IDLE" option missing from context menu

Tags:

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?

like image 877
nokalake Avatar asked Mar 21 '15 05:03

nokalake


People also ask

How do I access IDLE editor?

Click on the Idle File menu and select Open. (Or as you see, you can use the shortcut Ctrl-O . That means holding down the Ctrl key, and pressing the letter O for Open.)

How do I edit a Python IDLE?

You can also open IDLE directly from your Python script file. Right click the file, then choose "Edit with IDLE". Rather than going through the "Run..." menu, learn to use F5 (on some systems, Fn + F5) to run your script. It's much quicker.


1 Answers

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_ROOT\Python.File\shell\Edit with IDLE\command

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.

like image 174
Mark Ch Avatar answered Sep 19 '22 16:09

Mark Ch