Hi all.<br><br>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.<br>(The other question being at <a href="http://mail.python.org/pipermail/python-dev/2012-December/123287.html">http://mail.python.org/pipermail/python-dev/2012-December/123287.html</a>)<br>
<br>For a recap of the brief history, I have a parent process, that is spawning a child process via "subprocess".<br>Currently, the child-process is a GUI process; however, I intend to "behave" it as a dbus-service as well.<br>
<br>Thus,<br><br>a)<br>I subclassed the child-process "main" class with "dbus.service.Object"; however, I then got the error <br>"<code><span class="pln">metaclass conflict</span><span class="pun">:</span><span class="pln"> the metaclass of a derived </span><span class="kwd">class</span><span class="pln"> must be a </span><span class="pun">(</span><span class="pln">non</span><span class="pun">-</span><span class="pln">strict</span><span class="pun">)</span><span class="pln"> subclass of the metaclasses of all its bases</span></code>"<br>
<br><br>b)<br>I then used composition, wherein another class, "RemoteListener" deriving from "dbus.service.Object" was made an attribute of the "main" class. That worked.<br>However, when I do<br>
<br> dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)<br> GObject.mainloop.run()<br><br>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).<br>
<br><br>c)<br>I tried option b), but now instantiating "RemoteListener" in a separate thread; however, no improvement :(<br><br><br><br><br>Is there a way to run GUI and a dbus-service together? Or is a dbus-service pure "backend" process? :P<br>
<br>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 :)<br clear="all"><br><br><br><br>Regards,<br>Ajay<br>