setup_d.py 文件源码

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

项目:CodeReader 作者: jasonrbr 项目源码 文件源码
def _doregister(mod_name, dll_name):
    assert os.path.isfile(dll_name), "Shouldn't get here if the file doesn't exist!"
    try:
        key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, "Software\\Python\\PythonCore\\%s\\Modules\\%s" % (sys.winver, mod_name))
    except winreg.error:
        try:
            key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, "Software\\Python\\PythonCore\\%s\\Modules\\%s" % (sys.winver, mod_name))
        except winreg.error:
            print("Could not find the existing '%s' module registered in the registry" % (mod_name,))
            usage_and_die(4)
    # Create the debug key.
    sub_key = winreg.CreateKey(key, "Debug")
    winreg.SetValue(sub_key, None, winreg.REG_SZ, dll_name)
    print("Registered '%s' in the registry" % (dll_name,))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号