@Igor、ご利用のヒントconfig_base
ありがとうございます。
configHandle = wx.Config(CONFIG_FILE)
# Sweep all elements in `self()` to find the grafical ones
# instance of the wxPython and salve the specific configuration.
for wxElement_name, wxElement_handle in self.__dict__.items():
# Each wxPython object have a specific parameter value
# to be saved and restored in the software initialization.
if isinstance(wxElement_handle, wx._core.TextCtrl):
configHandle.Write(wxElement_name, wxElement_handle.GetValue())
elif isinstance(wxElement_handle, wx._core.CheckBox):
configHandle.Write(wxElement_name, ('True' if wxElement_handle.GetValue() else 'False'))
elif isinstance(wxElement_handle, wx._core.SpinCtrl):
configHandle.Write(wxElement_name, str(wxElement_handle.GetValue()))
.
.
.
復元するには、このコードの逆のロジックを使用します。
{wx} pythonのどのバージョンをお使いですか?どのOS /ツールキットですか? – Igor
wxWidets = 4.0.0a3 gtk2(phoenix)、Python 3 in Ubuntu 16.04 – hildogjr
参考までにhttp://docs.wxwidgets.org/trunk/classwx_config_base.htmlを参照してください。 – Igor