Hello,<br><br>I've been trying to write my first Plasmoid in python, and I've been stuck on using the DataEngines [1]. I'm working off of the microblog applet [2] to try and understand how to interact with that engine. My problem comes when I try to get a service from my engine. I'm getting an error:<span style="font-family: courier new,monospace;"> <b>AttributeError: 'DataEngine' object has no attribute 'serviceForSource'</b></span> even though the api says it should be there [3]<br>
<br>Here is the chunk that is erroring out on me:<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> self.engine = self.dataEngine("microblog")</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> if not self.engine.isValid:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> self.setFailedToLaunch(True, "Could not get DataEngine")</span><br>
<span style="font-family: courier new,monospace;"> service = self.engine.serviceForSource("Timeline:Jmhobbs@<a href="https://twitter.com/">https://twitter.com/</a>")</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> cg = service.operationDescription("auth");</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> cg.writeEntry("password", "SuperSecret");</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> service.startOperationCall(cg);</span><br><br>I'm running Python 2.5.4, and KDE - 4.2.4 (Debian sid)<br><br>My questions are,<br><ol><li>Is there something fundamentally wrong with my understanding on how to use DataEngines?</li>
<li>Is there just a version mismatch between the bindings (as documented) and my system?</li><li>Is there documentation on the microblog engine and how to use it?</li><li>Do I have an alternative? I tried QThreads/urllib (crashes unpredictably), and KIO (KUrl seems to ignore setUser() and setPass()) already to no avail.<br>
</li></ol>Thanks so much in advance for your assistance. I'm looking forward to creating more community content once I iron this stuff out :-)<br><blockquote style="margin: 1.5em 0pt;"></blockquote>[1] - <a href="http://techbase.kde.org/Development/Tutorials/Plasma/Python/Using_DataEngines">http://techbase.kde.org/Development/Tutorials/Plasma/Python/Using_DataEngines</a><br>
[2] - <a href="http://websvn.kde.org/trunk/KDE/kdeplasma-addons/applets/microblog/microblog.cpp?view=markup">http://websvn.kde.org/trunk/KDE/kdeplasma-addons/applets/microblog/microblog.cpp?view=markup</a><br>[3] - <a href="http://api.kde.org/pykde-4.2-api/plasma/Plasma.DataEngine.html#obj3065602732">http://api.kde.org/pykde-4.2-api/plasma/Plasma.DataEngine.html#obj3065602732</a><br>
<br clear="all">- John Hobbs<br><br><a href="mailto:john@velvetcache.org">john@velvetcache.org</a><br><br><a href="http://www.velvetcache.org/">http://www.velvetcache.org/</a><br>