解决.py文件右键没有Edit with IDLE选项的方法

重装了win10,64位,安装完python3.6和Sublime Text,今天心血来潮想用python的IDLE来编辑时却发现:鼠标右键.py文件之后,却没有Edit with IDLE选项。

网上搜到的方案完美的解决了这个问题,故在此做一下记录:

1、打开注册表(Windows+R,输入regedit回车)

解决.py文件右键没有Edit with IDLE选项的方法

 

2、在注册表中找到

HKEY_CLASSES_ROOT\SystemFileAssociations

该路径下的.py,如果没有则自己创建(我的情况就是没有该键值,需要自己创建)

\.py\shell\Edit with IDLE\command

解决.py文件右键没有Edit with IDLE选项的方法

将command的值设置为:

"C:\\Users\\admin\\AppData\\Local\\Programs\\Python\\Python36-32\\pythonw.exe" "C:\\Users\\admin\\AppData\\Local\\Programs\\Python\\Python36-32\\Lib\\idlelib\\idle.pyw" -e "%1"
(以上是python的安装路径,根据情况自行修改)

解决.py文件右键没有Edit with IDLE选项的方法

 

 

原文链接如下:

解决.py文件右键没有Edit with IDLE选项的方法