[Python-Dev] Running GUI and "GObject.mainloop.run()" together?
ajaygargnsit at gmail.com
Mon Dec 24 09:26:20 CET 2012
This is another question that arises as part of my efforts to run a GUI
application, as well as a dbus-service within the same process.
(The other question being at
For a recap of the brief history, I have a parent process, that is
spawning a child process via "subprocess".
Currently, the child-process is a GUI process; however, I intend to
"behave" it as a dbus-service as well.
I subclassed the child-process "main" class with "dbus.service.Object";
however, I then got the error
"metaclass conflict: the metaclass of a derived class must be a
(non-strict)subclass of the metaclasses of all its bases
I then used composition, wherein another class, "RemoteListener" deriving
from "dbus.service.Object" was made an attribute of the "main" class. That
However, when I do
in the "RemoteListener"'s __init__ method, the GUI of the "main" class
fails to load (apparently, because the "mainloop.run()" causes the
singular, main-thread to go into busy-wait).
I tried option b), but now instantiating "RemoteListener" in a separate
thread; however, no improvement :(
Is there a way to run GUI and a dbus-service together? Or is a dbus-service
pure "backend" process? :P
I will be grateful for any pointers; if you need me to test anything else,
please let me know, I will be more than willing :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev