Skip to content

Instantly share code, notes, and snippets.

@smontanaro
smontanaro / tkasyncio.py
Created March 31, 2022 14:28
First attempt at asyncio integration of the Tk event loop
#!/usr/bin/env python3
"Testing the idea of providing an off-the-shelf Tk event loop for asyncio"
import asyncio
import random
from tkinter import Tk, Button
class AsyncTk(Tk):
"Basic Tk with an asyncio-compatible event loop"