Skip to content

Conversation

@smontanaro
Copy link
Contributor

@smontanaro smontanaro commented Apr 3, 2022

This is far from complete. I have never done any GUI or asyncio testing before. Combining the two is probably way above my pay grade. I did try to add some useful library documentation (including an example), which will hopefully help whoever also works on this understand what I was thinking.

Also, I imagine there is more than one way to skin this cat. I chose to add a method run from the asyncio side of things which keeps the Tk event queue updated. The reverse is probably also possible (force asyncio to use the Tk mainloop).

https://bugs.python.org/issue47190

@smontanaro
Copy link
Contributor Author

I also don't expect this to be accepted in its current form. I'm just putting it out there as the basis for discussion.

@smontanaro
Copy link
Contributor Author

I don't understand the Docs/Docs errors. This occurs several times:

Error: [2] library/tkinter.async.rst:12: default role used

The docs built fine with no errors in my checkout.

@TeamSpen210
Copy link

It'd be better to figure out a way to run asyncio inside the tkinter event loop - that way if both are waiting for something, the whole process can go to sleep.

@smontanaro
Copy link
Contributor Author

I make no claim that this way is the best (or only) way to get the desired result. I chose this approach, at least in part, because I had an asyncio example of using pynput listeners to monitor keyboard and mouse activity.

I'll see if I can flip the script.

@iritkatriel
Copy link
Member

https://bugs.python.org/issue47190 is closed. What is the status of this PR?

@graingert
Copy link
Contributor

graingert commented Jun 16, 2022

https://bugs.python.org/issue47190 is closed. What is the status of this PR?

It was closed as duplicate of
#71733

@smontanaro smontanaro marked this pull request as draft November 1, 2022 15:22
@smontanaro smontanaro closed this Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants