howto redirect stdout/stderr into a wxPython textctrl?

N

newgene

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top