Asynchronous programming
Terry Reedy
tjreedy at udel.edu
Thu Aug 25 18:16:52 EDT 2016
On 8/11/2016 11:55 PM, Lawrence D’Oliveiro wrote:
> On Friday, August 12, 2016 at 2:25:05 AM UTC+12, Terry Reedy wrote:
>
>> When I read something like "Python finally acquired an event loop in
>> 3.4" I wonder where people have been. The tk event loop has been in
>> Python perhaps for 2 decades...
>
> As was pointed out to me just a few days ago, that’s Tcl, not Python.
Tk is part of Tcl/Tk. Tk's mainloop() calls level tcl loop functions.
The tkinter and _tkinter modules are Python stdlib modules. For
timer-based callbacks, there is little difference between using tkinter
and async modules. The fact that async uses a Python-coded event loop
while tkinter uses a Tcl-coded loop is nearly invisible. Several other
stdlib modules wrap 'foreign' code too.
--
Terry Jan Reedy
More information about the Python-list
mailing list