Skip to content

Instantly share code, notes, and snippets.

View benbovy's full-sized avatar

Benoit Bovy benbovy

View GitHub Profile
@moshekaplan
moshekaplan / TextHandler.py
Last active February 25, 2024 01:33
A Logging Handler that allows logging to a Tkinter Text Widget
#!/usr/bin/env python
# Built-in modules
import logging
import Tkinter
import threading
class TextHandler(logging.Handler):
"""This class allows you to log to a Tkinter Text or ScrolledText widget"""
def __init__(self, text):