I’ve read http://wxpython.org/docs/api/wx.ConfigBase-class.html
I’ve done some basic things like the appended. What I can see is that
Config.Create() returns me some sort of configuration object, which has
information about python in it. But clearly that’s not what I’m looking for:
I seem to be missing the magic to say “give me a Config that is the Windows Registry”…
Thanks!
GaJ
>>> import wx
>>> from wx import Config
>>> app=wx.App(False)
>>> config=Config.Create()
>>> config.HasGroup("HKEY_CURRENT_USER")
False
>>> config.GetFirstEntry()
(0, u'', -1)
>>> config.GetFirstGroup()
(1, u'PythonCore', 1)
>>> config.GetNextGroup(1)
(0, u'', -1)
>>> config.GetNumberOfGroups()
1
>>> config.GetPath()
u''
>>> config.HasEntry("PythonCore")
False
>>> config.GetFirstGroup()
(1, u'PythonCore', 1)
The Config classes are not intended to be used as a general purpose access path to the registry. Instead it just facilitates storing and retrieving your application’s preferences data, in the way that is appropriate for the platform. In other words, it will always use a root location of something like:
assuming that the VendorName and AppName have been set on your wx.App object. If you want to access anything else in the registry then you’ll need to use some other module to do it, as has already been mentioned.