howto redirect stdout/stderr into a wxPython textctrl?

Discussion in 'Python' started by newgene, Jul 28, 2003.

  1. newgene

    newgene Guest

    Hi, group,
    I guess it is a simple question for you, but it puzzles me for a
    while.
    I use a wxTextCtrl in my application for output result and any
    exception msg. I know I can add new msg onto wxTextCtrl by WriteText()
    method. But I have a function imported from another module and in this
    function all results are output by "print". I am wondering if I can
    redirect stdout and stderr into the wxTextCtrl object, so that all
    output from that function will be shown up on wxTextCtrl box and I
    don't need modify the current code for that function.

    Thank you.


    Chunlei
     
    newgene, Jul 28, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VisionSet
    Replies:
    6
    Views:
    9,633
    Sudsy
    Sep 20, 2003
  2. Guest
    Replies:
    3
    Views:
    1,187
    Guest
    Jan 11, 2004
  3. Tsai Li Ming
    Replies:
    6
    Views:
    1,207
    Donn Cave
    May 31, 2004
  4. Alejandro
    Replies:
    4
    Views:
    6,125
    paladin28
    Aug 12, 2010
  5. lsyx
    Replies:
    0
    Views:
    159
Loading...

Share This Page