在右键菜单中添加Edit with IDLE
以安装Anaconda环境为例
在桌面新建一个文本文件,粘贴如下代码:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\SystemFileAssociations\.py\shell\Edit with IDLE\command]
@="\"...X\\pythonw.exe\" \"...X\\Lib\\idlelib\\idle.py\" -e \"%1\""
其中...X为Anaconda的安装路径
保存文件,将后缀名改为.reg(注册表文件),然后双击运行
手动添加
Win+R运行输入regedit打开注册表,打开目录HKEY_CLASSES_ROOT\SystemFileAssociations,查看有没有.py文件夹,如果没有请自行新建添加,在.py文件夹下新建添加.shell文件夹,在shell文件夹下新建添加Edit with IDLE文件夹,在Edit with IDLE文件夹下新建添加command文件夹,在Edit with IDLE文件夹下新建添加shell文件夹,点击command文件夹,在右侧的右键点击默认选项→修改(M)→在弹出的编辑字符串窗口中数值数据(V)项的输入框中粘贴:"...X\\pythonw.exe" "...X\\Lib\\idlelib\\idle.pyw" -e "%1"
其中...X为Anaconda的安装路径