X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4276dc529d44f9107748f2ed6ca36f8ddfce12f4..78a32590b12dd14507a3c175e346543bef4ad63e:/wxPython/src/gtk/core.py diff --git a/wxPython/src/gtk/core.py b/wxPython/src/gtk/core.py index 2b0e5149e6..bc4641def5 100644 --- a/wxPython/src/gtk/core.py +++ b/wxPython/src/gtk/core.py @@ -4958,6 +4958,13 @@ class PyOnDemandOutputWindow: 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): """ @@ -4982,11 +4989,6 @@ class PyOnDemandOutputWindow: wx.CallAfter(self.frame.Close) - def OnCloseWindow(self, event): - if self.frame is not None: - self.frame.Destroy() - self.frame = None - self.text = None #---------------------------------------------------------------------- @@ -5060,7 +5062,7 @@ your Mac.""" self.RestoreStdio() - 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') @@ -8131,6 +8133,8 @@ class SizerItem(Object): """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) @@ -9222,6 +9226,8 @@ try: except NameError: __builtins__.True = 1==1 __builtins__.False = 1==0 + def bool(value): return not not value + __builtins__.bool = bool