<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">Hello,<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>The code in this tutorial<br>
  - http://techbase.kde.org/Development/Tutorials/Plasma/PythonPlasmoid<br>
after getting it to work by changing<br>
  <span style=" font-family:'monospace';">charge = data</span><span style=" font-family:'monospace'; color:#000000;">[</span><span style=" font-family:'monospace';">QString</span><span style=" font-family:'monospace'; color:#000000;">(</span><span style=" font-family:'monospace'; color:#483d8b;">"Charge Percent"</span><span style=" font-family:'monospace'; color:#000000;">)]</span><span style=" font-family:'monospace';">.</span><span style=" font-family:'monospace'; color:#000000;">toInt()[</span><span style=" font-family:'monospace';">0</span><span style=" font-family:'monospace'; color:#000000;">]</span><br>
to<br>
  charge = data[QString("Charge Percent")] <br>
gives<br>
{{{ <br>
Connecting to battery /org/freedesktop/Hal/devices/computer_power_supply_battery_BAT0<br>
Unrecognized character: /                                                            <br>
Unrecognized character: /                                                            <br>
ERROR: syntax error<br>
}}}<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>The line which triggers this is <br>
  self.engine.connectSource(battery, self)<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>What's wrong?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>-- Maik<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>PS; kde-4.3 on arch linux.</p></body></html>