{"id":13502118,"url":"https://github.com/fluentpython/asyncio-tkinter","last_synced_at":"2025-05-06T05:32:06.574Z","repository":{"id":28950269,"uuid":"32476311","full_name":"fluentpython/asyncio-tkinter","owner":"fluentpython","description":"Example of running asyncio on top of the Tcl/Tk event loop via Tkinter","archived":false,"fork":false,"pushed_at":"2015-04-05T20:12:21.000Z","size":2364,"stargazers_count":65,"open_issues_count":5,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-09T09:11:17.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluentpython.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-18T18:18:13.000Z","updated_at":"2024-04-29T07:33:08.000Z","dependencies_parsed_at":"2022-08-27T13:11:53.133Z","dependency_job_id":null,"html_url":"https://github.com/fluentpython/asyncio-tkinter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentpython%2Fasyncio-tkinter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentpython%2Fasyncio-tkinter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentpython%2Fasyncio-tkinter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluentpython%2Fasyncio-tkinter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluentpython","download_url":"https://codeload.github.com/fluentpython/asyncio-tkinter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252629212,"owners_count":21779167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T22:02:02.470Z","updated_at":"2025-05-06T05:32:04.532Z","avatar_url":"https://github.com/fluentpython.png","language":"Python","readme":"==========================\nUsing asyncio with Tkinter\n==========================\n\nThe ``tkapp.py`` and ``tkapp2.py`` examples in this folder demonstrate:\n\n- using an alternative ``asyncio.BaseEventLoop`` subclass on top of the Tkinter event loop;\n- leveraging futures and ``yield from`` to escape *callback hell*;\n- applying the ``asyncio`` abstractions to GUI programming instead of network programming.\n\nHistory\n=======\n\nThe code is adapted from Dino Viehland's (@DinoV) talk `Using futures for async GUI programming in Python 3.3 \u003chttp://lanyrd.com/2013/pycon/scdywd/\u003e`_ presented at PyCon US 2013. Dino's example used Tulip because the first release of ``asyncio`` was not available then; some APIs changed later and the ``tkapp.py`` was not working with Python 3.4 and ``asyncio`` from the standard library.\n\nLuciano Ramalho (@ramalho) updated this code to run with Python 3.4 with help and encouragement from Guido van Rossum (@gvanrossum). See relevant thread in the `python-tulip \u003chttps://groups.google.com/d/msg/python-tulip/TaSVW-pjWro/QO07gF9dreEJ\u003e`_ group.\n\nRamalho also wrote the ``tkapp2.py`` which makes it easier to run the three demonstrations from Viehland's talk: sequential processing, asynchronous with callbacks and asynchronous with coroutines.\n\nAlan Cristhian (@AlanCristhian) fixed the hang-on-exit bug by turning the ``asyncio`` event loop thread into a daemon; see ``guievents.py``, method ``GuiEventLoop._start_io_event_loop``.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluentpython%2Fasyncio-tkinter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluentpython%2Fasyncio-tkinter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluentpython%2Fasyncio-tkinter/lists"}