git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26200
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
EVT_CLOSE(self.frame, self.OnCloseWindow)
EVT_CLOSE(self.frame, self.OnCloseWindow)
+ def OnCloseWindow(self, event):
+ if self.frame is not None:
+ self.frame.Destroy()
+ self.frame = None
+ self.text = None
+
+
# These methods provide the file-like output behaviour.
def write(self, text):
"""
# These methods provide the file-like output behaviour.
def write(self, text):
"""
wx.CallAfter(self.frame.Close)
wx.CallAfter(self.frame.Close)
- def OnCloseWindow(self, event):
- if self.frame is not None:
- self.frame.Destroy()
- self.frame = None
- self.text = None
#----------------------------------------------------------------------
#----------------------------------------------------------------------
- def RedirectStdio(self, filename):
+ def RedirectStdio(self, filename=None):
"""Redirect sys.stdout and sys.stderr to a file or a popup window."""
if filename:
_sys.stdout = _sys.stderr = open(filename, 'a')
"""Redirect sys.stdout and sys.stderr to a file or a popup window."""
if filename:
_sys.stdout = _sys.stderr = open(filename, 'a')
"""GetProportion() -> int"""
return _core.SizerItem_GetProportion(*args, **kwargs)
"""GetProportion() -> int"""
return _core.SizerItem_GetProportion(*args, **kwargs)
+ SetOption = SetProportion
+ GetOption = GetProportion
def SetFlag(*args, **kwargs):
"""SetFlag(int flag)"""
return _core.SizerItem_SetFlag(*args, **kwargs)
def SetFlag(*args, **kwargs):
"""SetFlag(int flag)"""
return _core.SizerItem_SetFlag(*args, **kwargs)