[Tkinter] text widget update problem

Thomas Rademacher rademacher at prostep.FTA-berlin.de
Thu Nov 28 05:01:49 EST 2002


Hallo,

I want to write a text widget which can be filled step by step in dependent
on program sequence:
...
scrollbar = Scrollbar(frameMsg, orient=VERTICAL)
scrollbar.pack(fill=Y, side=RIGHT)
text = Text(frameMsg, bd=0,font='courier 8', width=960, height=450,
fg="black")
text.pack()
text.config(yscrollcommand=scrollbar.set)
scrollbar.config(command=text.yview)
...

The input of the text widget I create in a singleton logger class:
...
Logging.__msgHandle.insert(END, logString)
Logging.__msgHandle.update()  <--
...

I want to see the the output step by step during program sequence. But I
have following problems:
1. With Logging.__msgHandle.update() I get a program crash when all lines in
the widget filled. The widget does not show the following messages.
2. Without  Logging.__msgHandle.update() I get the my program output at the
end of the program and not step by step.

How can I resolve the problem? Who has any ideas? It is a singleton class
problem?
Thank's for your hints, Thomas





More information about the Python-list mailing list