Windows下.py文件右键菜单的增删

一、pythonxy在安装之后向 .py文件的右键菜单添加了 "Edit with IDLE"和"Run in interactive mode"两个条目。对应注册表项有:

\HKEY_CLASSES_ROOT\Python.File\shell\Edit with IDLE\command 值为:
"D:\devenv\Python27\pythonw.exe" "D:\devenv\Python27\Lib\idlelib\idle.pyw" -e "%1"

\HKEY_CLASSES_ROOT\Python.File\shell\Run in interactive mode\command 值为:
"D:\devenv\Python27\python.exe" "-i" "%1" %*

\HKEY_CLASSES_ROOT\Python.File\shell\open\command 值为:
"D:\devenv\Python27\python.exe" "%1" %*

二、安装 Python Tools for VS后,.py文件的右键菜单添加了 "Edit with Visual Studio"。
对应注册表项为:\HKEY_CLASSES_ROOT\py_auto_file\shell\Edit with Visual Studio

因为py_auto_file项的优先级高于Python.File的,所以前面三种打开方式都会消失掉,可以将需要的条目加到py_auto_file分支下。

posted @ 2013-03-16 17:51  shankun  阅读(986)  评论(0编辑  收藏  举报