redirecting stdout to splitter

Hi All,

I'm running some code very similar to the splitter example in the wxpyhton docs and demos.

i want to use the right panel as the stdout (i.e, for printing results of functions running out of the GUI).

I create the right panel :

self.RightPanel = RightPane(splitter, "Lime Green", "Panel Three")

and

class RightPane(wx.Panel):
    """
    The right panel of the splitter, tests state and results.
    """

    def __init__(self, parent, colour, label):
        wx.Panel.__init__(self, parent, style=wx.BORDER_SUNKEN|wx.EXPAND)
        self.SetBackgroundColour(colour)

    def SetOtherLabel(self, label):
        wx.StaticText(self, -1, label, (5, 30))

is there a nice way to make this panel as stderr/stdout ??

thanks,
Roy.

···

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

There are many ways of making that right panel stderr/stdout. The
method I use is included as plugins/logger.py in the PyPE source
(available at PyPE (Python Programmers Editor) download | SourceForge.net ). Generally, you replace
sys.stderr and sys.stdout with some window with a .write() method. From
there, you can handle date/time stamping, etc.

- Josiah

···

"ROY ZINN" <royzinn@hotmail.com> wrote:

class RightPane(wx.Panel):
    """
    The right panel of the splitter, tests state and results.
    """

    def __init__(self, parent, colour, label):
        wx.Panel.__init__(self, parent, style=wx.BORDER_SUNKEN|wx.EXPAND)
        self.SetBackgroundColour(colour)

    def SetOtherLabel(self, label):
        wx.StaticText(self, -1, label, (5, 30))

is there a nice way to make this panel as stderr/stdout ??