log window

Hi all,

I am trying to find some useful class in wxPython which enables me to
create 'fancy' log output window.

When the user run external command on the background, all messages
from stderr should be printed to this log output window immediately.

E.g.

$ command file=x
Warning: File <x> already exists and will be overwritten
Computing...
Error: Out of memory

I was thinking about StyledTextCtrl, to define special styles for
lines with command, warnings, messages or errors, etc.

+ $ command file=x

- [warning image] File <x> already exists and will be overwritten
- Computing...
- [error image] Out of memory

+ $ command file=y

-

Thanks for any hits! Best regards, Martin

···

--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *

StyledTextCtrl should work. You'll need to "catch" the data streams in
some kind of variable and do some formatting to the text before sending
them on to the StyledTextCtrl though since the data will just be plain
text otherwise. Since their just strings, redirect stdout/stderr to a
variable to hold the string, do the necessary formatting and then write
the string to the StyledTextCtrl.

Mike

···

-----Original Message-----
From: Martin Landa [mailto:landa.martin@gmail.com]
Sent: Sunday, October 14, 2007 5:27 AM
To: wxpython-user
Subject: log window

Hi all,

I am trying to find some useful class in wxPython which
enables me to create 'fancy' log output window.

When the user run external command on the background, all
messages from stderr should be printed to this log output
window immediately.

E.g.

$ command file=x
Warning: File <x> already exists and will be overwritten Computing...
Error: Out of memory

I was thinking about StyledTextCtrl, to define special styles
for lines with command, warnings, messages or errors, etc.

+ $ command file=x
>- [warning image] File <x> already exists and will be overwritten
>- Computing...
>- [error image] Out of memory

+ $ command file=y
>-

Thanks for any hits! Best regards, Martin

--
Martin Landa <landa.martin@gmail.com> *
http://gama.fsv.cvut.cz/~landa *