I have a program that receives serial data and uses matplotlib to graph it using Tkinter. I have this working currently, but I've had to use the .after() function to poll a queue for data. In other UI frameworks I've used in the past (different projects in C) there has been a way to ask the UI framework to call a function given to it from the mainloop (either after some amount of time, during idle, etc). If I try to use .after() on a thread which isn't the mainloop, it doesn't work and complains at me.
Is there a way to call a user supplied function, provided on a thread which isn't the mainloop, from the mainloop? Or, is there a way to instruct the mainloop to wake up and do some work if a Queue gets some data?
Thanks.