logging to a text widget

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alexandre Guimond

    #1

    logging to a text widget

    Hi. I'm using the logging package. I would like to send my log messages
    to a Text widget creating using Tkinter. I was wondering if there was a
    logging handler class that would do this. It seems that the standard
    handlers do not support this. Has anyone tried to do this?

    Thx for any help,

    alex

  • Martin Franklin

    #2
    Re: logging to a text widget

    Alexandre Guimond wrote:[color=blue]
    > Hi. I'm using the logging package. I would like to send my log messages
    > to a Text widget creating using Tkinter. I was wondering if there was a
    > logging handler class that would do this. It seems that the standard
    > handlers do not support this. Has anyone tried to do this?
    >[/color]

    Alex,

    To be honest I haven't used the logging package (it's on my todo list ;)
    but I normally sub class the Text widget, give it a write method then
    send stdout / stderr to it normally (sys.stdout = mytextWidget)

    At the same time I also add scrollbars and in the write method I scroll
    to the latest message.

    Cheers
    Martin

    Comment

    Working...