[Tutor] What exactly does await do? (ThreeBlindQuarks)(David)

Mats Wichmann mats at wichmann.us
Sun Feb 19 14:24:57 EST 2023


On 2/19/23 04:20, Alphonsus wrote:
> I am sorry that the question seemed overly complicated, here I will
> try to make things as simple as things are. In reply to David's
> question, I am actually writing a gui program but it is expected to do
> a ton of request and on request by the user read a file, but while the
> file is being read, I do not expect the program gui loop to stop, and
> this is the same with the request.

Okay, you've actually hit on something that is not super-well explored - 
the coexistence of two programming systems that are both event-loop based.

This came up a while back in a forum, I had to go digging because my 
memory isn't that good:

https://discuss.python.org/t/connecting-asyncio-and-tkinter-event-loops/14722/4

maybe some nuggets in that, seems like people do have it working, but 
Python itself didn't do anything specific to make it easy (see Guido's 
comment)




More information about the Tutor mailing list