Hi, Tim,
Igor Korot wrote:
Hi, ALL,
OS: Windows XP
Python: 2.7
wx: 2.9.4.
I’m trying to create a following tree in registry:
myApp
key1 name value
name value
key2 name value
name value
Here is what I have
class MyFrame(wx.Frame,KVObject):
def init(…):
self.config = wx.Config( “MyApp” )
def myFunc():
path = self.config.GetPath()
self.config.SetPath( "/myApp/" + key1 ) #key1 does not
exist here
self.config.Write( “name”, value )
AFAIU, this should create a myApp key in the registry, create the key1
key in it and write some “name”=>“value” to it.
However upon executing and loading the registry, nothing is created
there and nothing is written.
Where are you looking? This should create
HKEY_CURRENT_USER\Software\MyApp\myApp\key1
If you were running this as a 32-bit app on a 64-bit system, you might
be getting fooled by registry redirection, but on XP that’s not a concern.
BTW, just so you’re aware, the “root” of your tree will be “MyApp”.
When you create “/myApp/” in SetPath, that creates another subkey called
“myApp” within your “MyApp” key.
Just as a proof that something strange is going on, I opened the python console and did this:
C:\Documents and Settings\Igor.FORDANWORK>python
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
import wx
conf = wx.Config( “python-test” )
<wx._misc.Config; proxy of <Swig Object of type ‘wxConfig *’ at 0x1012e68> >
conf.SetPath( “key1” )
conf.WriteInt( “name”, 1 )
True
exit()
C:\Documents and Settings\Igor.FORDANWORK>python
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
import wx
conf = wx.Config( “python-test” )
num = conf.GetNumberOfEntries()
print num
0
Is this function implemented in wxPython?
Basically what I’m looking for is the custom “recent used” menu.
Also, the documentation talks about enumerating keys, but the actual enumerating functions are not documented.
I understand that people are encouraged to look at main wxWidgets documentation, but it would be helpful to
have at least mentioning of those functions.
Thank you.
···
On Mon, Aug 26, 2013 at 10:50 AM, Tim Roberts timr@probo.com wrote:
–
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
–
You received this message because you are subscribed to the Google Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.