[PyQt] redirect stdout to QTextEdit widget

NARCISO, Rui RUI.NARCISO at airbus.com
Mon Feb 16 18:59:09 GMT 2009

Hi all,

I would to redirect the standard output to a QTextEdit but I would like it to be dynamic, ie, as soon as something is printed to the stdout the contents of QTextEdit should be updated..

Changing the output of the ocde I'm running directly to the QTextEdit is not an option.

I have tried to do it by reassigning the sys.stdout file descriptor but I'm encountering "memory fault" errors when trying to write to the QtextEdit.

Would anyone have a webpage or some code I could use? 

Thanks in advance

The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other then the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.

More information about the PyQt mailing list