[python-win32] I need to walk the Windows registry

Martin Katz mkatz@tapstone.com
Thu, 12 Dec 2002 11:39:52 -0800

I need to retrieve all of the values in a subtree of the registry. I am 
using _winreg.EnumKey() and _winreg.EnumValue().

My problem is that the key and value names in the registry are not 
ASCII. Value names can contain any 2-byte character from 1 through 
65535. Key names have an additional restriction that they cannot contain 
a backslash.

_winreg.EnumValue doesn't return value names correctly if any of the 
characters are  above 255. _winreg.QueryValueEx raises an exception if 
it is passed a name with values above 127.

Anybody have any suggestions? Do I have to patch _winreg or is there a 
better alternative?