wxGetResource seems to be broken in wxPython2.4.x

I use it to read .ini files of my own making. It doesn't seem that XRC
will allow me to do that.
Do I have to roll my own .ini file reader, or is there a functional
equivalent?

Chris Spencer
Merkur Group
(800) 637-1704
(513) 612-8000 x132
Fax: (513) 612-8080
E-mail chris.spencer@merkurgroup.com
Web http://www.merkurgroup.com

···

-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Tuesday, January 14, 2003 6:02 PM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] wxGetResource seems to be broken in
wxPython2.4.x

Christopher L. Spencer wrote:

Can anyone tell me why this is broken in the new wxPython release?

from wxPython.wx import *
wxGetResource("MAIN","MerkurDir",r"c:\windows\merkur.ini")

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: name 'wxGetResource' is not defined

Because the "old" resource system has been deprecated for several
releases and so when wxWindows changed the default compilation flags so
it's not compiled in by default, I did the same thing for wxPython. You

should switch to XRC instead.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

ConfigParser in the standard library? Not sure how up-to-date it is, but may be usable for you.

HTH,
Mike

Christopher L. Spencer wrote:

I use it to read .ini files of my own making. It doesn't seem that XRC
will allow me to do that.
Do I have to roll my own .ini file reader, or is there a functional
equivalent?

...

Christopher L. Spencer wrote:

I use it to read .ini files of my own making. It doesn't seem that XRC
will allow me to do that.
Do I have to roll my own .ini file reader, or is there a functional
equivalent?

wxFileConfig, or just wxConfig which will write to INI-like files on non windows platforms and will use the registry on windows.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!