在 Windows 7 上使用 IDLE (Python GUI) 上下文菜单进行编辑
在 Windows XP 下,我有一个用于 Python 源文件的上下文菜单条目“使用 IDLE 编辑”。我尝试通过在 Windows 7(32 位)下设置相应的注册表项来实现此操作
HKEY_LOCAL_MACHINE\SOFTWARE\.py\shellex\ContextMenuHandlers\
,但没有成功 - 上下文菜单项不出现。 如何在 Windows 7 中设置特定文件类型的上下文菜单条目?
Under Windows XP I have a context menu entry "edit with IDLE" for Python source files. I tried to make this work under Windows 7 (32 bit) as well by setting the corresponding registry entries under
HKEY_LOCAL_MACHINE\SOFTWARE\.py\shellex\ContextMenuHandlers\
However without success - the context menu entry does not appear.
How do I set a context menu entry for a specific file type in Windows 7?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我花了一些时间试图弄清楚这一点,终于明白了。我运行的是 Windows 7,但 Windows Vista、Windows 应该是相同的XP 等
regedit
并按 ENTER).py
.py
键,将其删除。执行此操作,直到出现消息:已完成搜索注册表。重复此过程,但更改以下查询的搜索:
.pyw
python
python.exe
pythonw.exe
I spent some time trying to figure this out, and finally got it. I'm running Windows 7, but it should be the same for Windows Vista, Windows XP, etc.
regedit
and hit ENTER).py
.py
key you come across, delete it.Do this until it gives you the message: finished searching the registry. Repeat this process but changing the search for the following querys:
.pyw
python
python.exe
pythonw.exe
Delete them all
我在 Windows 7 上安装了 Python 2.7,并且安装程序自动创建了上下文菜单。我的第一个建议是尝试再次运行 Python 安装程序,看看上下文菜单是否自动创建,而不是手动添加。
注册表项的路径与您在评论中指出的路径相同,这就是命令:
该命令与您发布的命令存在一些细微差别,但我不确定这些是否会导致上下文条目未出现。
I installed Python 2.7 on Windows 7 and the context menu was created automatically by the installer. My first suggestion would be to try running the Python installer again to see if the context menu gets created automatically instead of adding it manually.
The registry entry had the same path as you indicate in your comment, and this was the command:
There are some minor differences in the command from what you posted, but I am not sure whether those would account for the context entry not appearing.