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
评论列表
文章目录