Python DBUS Needs a Mainloop Function (Eliminating the OLPCGames wrapper-hack)


At some point we should see if we can convince the Python DBUS peoples to expose a method which lets one write a mainloop in Python. That would let Pygame scripts use the DBUS (and thus Telepathy) module natively, rather than having to integrate multiple mainloops in every application.

Yes, yes, I know threading works, but it works much like walking through sewage. With the proper preparation and care you can get out of it without any damage, but even the slightest slip-up and you've ruined your day.

To be clear, I mean a function that a Python process can call which will cause DBUS to process its pending events (including callbacks, socket operations and what have you) and then immediately return control to the caller. With that you'd just call the iterate dbus function each frame in Pygame and use callbacks and the like as normal for dbus signals and method calls.

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.