Help with reading WinXP registry

David Flory David.Flory at
Mon Aug 16 18:40:52 CEST 2004

I am trying to write a short program to list the keys and values in a
WinXP registry key.  I have tried to use pyRegistry and get an error.
My test code is:

Import pyRegistry
baseKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes"
basereg = 
print basereg.getKeyNames()

Which gives the error:

Traceback (most recent call last):
  File "D:\bin\", line 5, in ?
    print basereg.getKeyNames()
AttributeError: getKeyNames

What am I doing wrong?  Using basereg.getValueNames() works fine.

Is there a better way to access the registry in a Win32 system?

Tia, David

More information about the Python-list mailing list