472,789 Members | 1,327 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 software developers and data experts.

howto redirect stdout/stderr into a wxPython textctrl?

Hi, group,
I guess it is a simple question for you, but it puzzles me for a
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.
Jul 18 '05 #1
0 2366

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Logan | last post by:
I asked a similar question already in the wxPython mailing list, but did not get an answer up to now: 1.) When using a TextCtrl with styles (color etc.) in wxPython, is it then possible to get a...
by: Tsai Li Ming | last post by:
Dear all, I have a problem with a redirecting stdout and stderr. I am a top level module and has no control over the imported modules that are making system calls such as os.system or popen2.* ....
by: legba | last post by:
hi all.. I'm writing an application in python2.3 under linux debian which accepts new "plug-ins" in the form of c-written python extension modules. My problem is that I'd like to catch the...
by: Lo?c Mah? | last post by:
Hello I try to use a Validator for a TxtCtrl placed in a Panel with a Button in order to trigger the Validator and test the content of TxtCtrl. I have looked into wxPython documentation and...
by: André | last post by:
Short description: Using a wxPython based app, I would like to take a python script in an editor window, invoke the python interpreter and use another window as stdin/stdout/stderr. Based on...
by: sillyemperor | last post by:
I was a new guy of Python,when i want to test my wxPython app by unittest,it couldn`t work.I fund a stubmaker.py but it only for wxDialog but all widgets.Can someone can tell me how test wxPython...
by: mikem76 | last post by:
How do I automatically redirect stdout and stderr when using os.popen2 to start a long running process. If the process prints a lot of stuff to stdout it will eventually stop because it runs out...
by: Alejandro | last post by:
Hi: I want to redirect stdout to a textctrl I have. From what I read in the wxpython documentation, I can use the wxLogTextCtrl class to do this. I am doing the following: class...
by: RossGK | last post by:
Just getting used to the PyDev environment in eclipse by playing with a few simple programs. I'm also using wxPython GUI stuff. I've noticed though that simple print commands in my code cause a...
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.