[PyQt] Catching exceptions everywhere
Grissiom
chaos.proton at gmail.com
Fri May 8 02:28:01 BST 2009
在 星期四 07 五月 2009 23:32:26,Lukas Hetzenecker 写道:
> Hello,
>
> you could redirect the interpreter’s standard error output stream:
> sys.stderr = YourClass(window.edit, sys.__stderr__, QColor(Qt.red))
> YourClass in an "file-like" object (it has an write function)
> window.edit is an instance of Qt's QTextEdit class and is used to display
> the message.
>
It seems this is a Really good idea! But what if I want to write messages to
the original stderr(i.e, to the terminal)?
--
Cheers,
Grissiom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090508/37d689a9/attachment-0001.html
More information about the PyQt
mailing list