“Edit with IDLE” option missing from context menu

前端 未结 11 1996
盖世英雄少女心
盖世英雄少女心 2020-12-09 10:46

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 contex

11条回答
  •  北海茫月
    2020-12-09 11:06

    Adding a little more detail to Teodorico Levoff's answer for those who need a little more explanation, like myself.

    Open a text editor, such as Notepad, and copy/paste the following, but be sure to modify the paths to pythonw.exe and idle.pyw so that they match the paths in your own system:

    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\""
    

    Save this text file as idle.reg in the Python27 folder, so you now have a file that resembles this (with your own file path, of course):

    C:\Python27\idle.reg
    

    Right-click the idle.reg file, and in the context menu, click Merge. A couple instructions may appear or notices that require a Yes or Continue that I selected. In the end, my .py files give me the option to "Edit in IDLE" again.

    I hope these explanations are helpful. Big thank you to those who've solved this problem before and shared there solutions.

提交回复
热议问题