Adding a little more detail to Theodoriko Levoff, the answer is for those who need a little more explanation, such as me.
Open a text editor such as Notepad and copy / paste the following, but remember to change the paths to pythonw.exe and idle.pyw so that they match the paths on 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 now you have a file similar to this one (with your own file path, of course):
C:\Python27\idle.reg
Right-click the idle.reg file and select Merge from the context menu. A couple of instructions or notifications may appear for which you need to select “Yes” or “Continue” that I have selected. In the end, my .py files again give me the "Edit in IDLE" option.
I hope these explanations will be helpful. Many thanks to those who solved this problem earlier and shared their solutions there.
source share