From 7409c0c61f30044ad3bdb9abebe750f88b44a5e3 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 12 Mar 2004 23:30:22 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/core.py | 16 ++++++++++------ wxPython/src/mac/core.py | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/wxPython/src/gtk/core.py b/wxPython/src/gtk/core.py index 2b0e5149e6..fb9d986036 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) diff --git a/wxPython/src/mac/core.py b/wxPython/src/mac/core.py index 2b0e5149e6..fb9d986036 100644 --- a/wxPython/src/mac/core.py +++ b/wxPython/src/mac/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) -- 2.45.2