您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Python文件右键找不到IDLE打开项解决办法

2024/4/23 10:31:29发布12次查看
经常会碰到,双击.py文件运行不了,或右键没有idle编辑的项,在win7系统中比较常见.
双击*.py文件运行不了解决办法:
右键点击 -> 打开方式 -> 选择默认程序 -> 浏览,找到并选择python.exe
右键没有idle项解决办法:
1. 如果python环境搭建不久,pythonpath,及lib/site-packages目录下也没有多少库文件时,可以重装
2. 修改注册表,
   i. 通过regedit命令来修改注册表
代码如下:
[hkey_classes_root\python.file\shell\editwithidle]
[hkey_classes_root\python.file\shell\editwithidle\command]
ii. 通过批处理文件的方式修改注册表
代码如下:
windows registry editor version 5.00
[hkey_classes_root\python.file\shell\editwithidle] 
@=&edit with idle
[hkey_classes_root\python.file\shell\editwithidle\command] 
@=\c:\\python27\\pythonw.exe\ \c:\\python27\\lib\\idlelib\\idle.pyw\ -e \%1\
保存上面的文件到python.reg,双击一下,就会同样修改注册表,重启生效
note: 替代成你自己的python安装目录就可以了。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product