python:\u winreg问题

2024-10-01 13:24:35 发布

您现在位置:Python中文网/ 问答频道 /正文

windows注册表可能包含其名称带有嵌入空值的项

当我调用_winreg.OpenKey(key, subkey_string_with_embbeded_null)时,我得到以下错误:

TypeError: OpenKey() argument 2 must be string without null bytes or None, not str

问题1:python\u winreg模块有一个限制,即它不能打开名为embbed为null的键,这个错误的含义是什么?在

问题2:我如何绕过这个限制?在


Tags: key名称string注册表windows错误withargument