@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/toolkit은 무엇입니까? – Igor
wxWidets = 4.0.0a3 gtk2 (phoenix), 우분투의 python 3 16.04 – hildogjr
참고 자료를 보려면 http://docs.wxwidgets.org/trunk/classwx_config_base.html을 참조하십시오. – Igor