GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing docs.wxpython.org — wx.ConfigPathChanger — wxPython 4.3.2 Docs
|
Changes the path of the given wx.ConfigBase object so that the key strEntry is accessible (for read or write). |
|
Returns the name of the key which was passed to the constructor. |
|
This method must be called if the original path inside the Config object (i.e. |
|
Class API¶Possible constructors:
ConfigPathChanger(pContainer, strEntry) -> None
A handy little class which changes the current path in a Config object and restores it in dtor.
Changes the path of the given wx.ConfigBase object so that the key strEntry is accessible (for read or write).
In other words, the constructor uses wx.ConfigBase.SetPath with everything which precedes the last slash of strEntry, so that:
wx.ConfigPathChanger(wx.ConfigBase.Get(), "/MyProgram/SomeKeyName")
has the same effect of:
wx.ConfigPathChanger(wx.ConfigBase.Get(), "/MyProgram/")
pContainer (wx.ConfigBase)
strEntry (string)
None
Returns the name of the key which was passed to the constructor.
The “name” is just anything which follows the last slash of the string given to the constructor.
str
This method must be called if the original path inside the Config object (i.e.
the current path at the moment of creation of this wx.ConfigPathChanger object) could have been deleted, thus preventing wx.ConfigPathChanger from restoring the not existing (any more) path.
If the original path doesn’t exist any more, the path will be restored to the deepest still existing component of the old path.
None