I\'m in the process of building a GUI-based application with Python/Tkinter that builds on top of the existing Python bdb module. In this application, I want to silence all std
I'm assuming this is part of a larger, threaded program.
Instead of using a lock, have your code write to a thread-safe queue object. Then, in your main thread you poll the queue and write to the text widget. You can do the polling using the event loop (versus writing your own loop) by running the polling job which reschedules itself to run a few ms later using after (a couple hundred ms is probably quite sufficient).