windows.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:start_jupyter_cm 作者: hyperspy 项目源码 文件源码
def remove_jupyter_here():
    for env in ('qtconsole', 'notebook'):
        try:
            winreg.DeleteKey(
                winreg.HKEY_CLASSES_ROOT,
                r'Directory\shell\jupyter_%s_here\Command' %
                env)
            winreg.DeleteKey(
                winreg.HKEY_CLASSES_ROOT,
                r'Directory\shell\jupyter_%s_here' %
                env)
            winreg.DeleteKey(
                winreg.HKEY_CLASSES_ROOT,
                r'Directory\Background\shell\jupyter_%s_here\Command' %
                env)
            winreg.DeleteKey(
                winreg.HKEY_CLASSES_ROOT,
                r'Directory\Background\shell\jupyter_%s_here' %
                env)
            print("Jupyter %s here context menu entry removed." % env)
        except:
            # If this fails it is because it was not installed, so nothing to
            # worry about.
            pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号