<div dir="ltr"><div class="syntax"><div class="text" style="font-family: monospace;"><ol><li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; bus = dbus.SystemBus<span class="br0">(</span><span class="br0">)</span></div></li><li class="li2">
<div class="de2">&nbsp;</div></li><li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; server = dbus.Interface<span class="br0">(</span> bus.get_object<span class="br0">(</span>avahi.DBUS_NAME, avahi.DBUS_PATH_SERVER<span class="br0">)</span>, avahi.DBUS_INTERFACE_SERVER<span class="br0">)</span></div>
</li><li class="li2"><div class="de2">&nbsp;</div></li><li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; sbrowser = dbus.Interface<span class="br0">(</span>bus.get_object<span class="br0">(</span>avahi.DBUS_NAME,</div></li><li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; server.ServiceBrowserNew<span class="br0">(</span>avahi.IF_UNSPEC,</div></li><li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; avahi.PROTO_UNSPEC, &#39;_ipp._tcp&#39;, &#39;local&#39;, dbus.UInt32<span class="br0">(</span><span class="nu0">0</span><span class="br0">)</span><span class="br0">)</span><span class="br0">)</span>,</div>
</li><li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; avahi.DBUS_INTERFACE_SERVICE_BROWSER<span class="br0">)</span></div></li><li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;</div></li><li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; sbrowser.connect_to_signal<span class="br0">(</span>&quot;ItemNew&quot;, self._printer_added_cb<span class="br0">)</span> </div>
</li></ol></div></div>I am trying to insert this code into model/MeshModel.py:__init__() in order create my newly written PrinterModel. It would appear that ItemNew events aren&#39;t being emitted, as the self._printer_added_cb call-back is never invoked. I&#39;ve tested this code in an external python script with sugar-shell, and it is working perfectly.<br>
<br>I am sure that I am missing something silly that is specfic to the sugar environment, so I am curious if anyone has any ideas as to why it isn&#39;t working.<br><br>Thanks in advance for any help.<br><br>--<br>Justin Gallardo<br>
</div>