1.运行中输入regedit打开注册表编辑器

2.在计算机\HKEY_CLASSES_ROOT\Python.File\shell中新建一个项,名称可自定义,这里我写的是Edit with anaconda,其中Edit with IDLE是之前下载的python2.7自带的

3.再添加一个项命名为command

值修改为"D:\Study\Tools\anaconda\pythonw.exe" "D:\Study\Tools\anaconda\Lib\idlelib\idle.pyw" -e "%1"(根据自己的路径而定)

4.右键任意py即可看到

网友评论