“Edit with IDLE” option missing from context menu

2019-01-23 18:43发布

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?

11条回答
Bombasti
2楼-- · 2019-01-23 19:03

As click to save button to save your python code there will be Two Extensions...1) .py and 2) .pyw.

So for Python 2 you have to save python program using extension .pyw.

查看更多
何必那么认真
3楼-- · 2019-01-23 19:04

Another option would be to just open the file with the idle by choosing open with:

C:\Python27\ArcGIS10.3\Lib\idlelib\idle.bat 

as the default program.

查看更多
欢心
4楼-- · 2019-01-23 19:04

I got the "Edit with IDKE" back with the option "Repair" of the deinstallation-menu.

查看更多
兄弟一词,经得起流年.
5楼-- · 2019-01-23 19:10

Directly from: https://superuser.com/questions/343519/python-idle-disappeared-from-the-right-click-context-menu

Here's a reg file to add the command to edit with IDLE for Python.File (.py) and Python.NoConFile (.pyw) file types. It's for Python 2.7, installed in C:\Python27, so substitute the paths to pythonw.exe and idle.pyw that are relevant to your installation. Save it to a .reg file. Then right-click and choose Merge.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Python.File\shell\Edit with IDLE\command] @="\"C:\Python27\pythonw.exe\" \"C:\Python27\Lib\idlelib\idle.pyw\" -e \"%1\""

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\Edit with IDLE\command] @="\"C:\Python27\pythonw.exe\" \"C:\Python27\Lib\idlelib\idle.pyw\" -e \"%1\""

查看更多
【Aperson】
6楼-- · 2019-01-23 19:11

After uninstalling both 2.7 and 3.6, reinstalling 3.6, I ran the init.py ,main.py, and idle.pyw found in C:\Program Files\python\Lib\idlelib and the edit with menu reappeared

查看更多
登录 后发表回答