Original Post
I've been writing an equation graphing utility in Python for a while, with pygame as the graphical end. The idea is that it would be controlled more or less directly by a Python interactive session. The problem is that the event queue doesn't get flushed this way. I've inserted a call to pygame.event.pump() in the update function, but I knew that it wasn't going to get called often enough to make a difference. The window generally doesn't behave well, and sometimes if it gets minimized I can't get it back up. This is a general pain in the butt. The ideal solution would be to simply turn off the event system. I've already tried pygame.event.set_allowed(None), but it didn't seem to work. Is there some trick that will make it work or is it just a dead end? Is it possible to do threads in regular python? It seems that I could make a thread that does nothing but pump the event loop. But I've read enough here to know that nothing in multi-threading is as easy as it seems. If worse comes to worst, I could learn a new graphics library. But I really don't want to have to do that. But if there was something appropriate in the Python standard library, I might be able to work with that. I'm really lost here. P.S. Another system that would require multi-threading is to continuously update the graph window from a list, that would be changed from the command line. But then I would have to put a mutex or something on the list, and that would probably be a big deal to do. Still, it would work.