Talk:Paths/Developer/Creating plasmoids with scripts

From KDE TechBase
Revision as of 13:37, 17 January 2009 by Tampakrap (talk | contribs) (Added note about obvious errors in the Python code)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Errors in Python code

There are numerous errors in the Python script. Running it gives:

 File "main.py", line 14
   self.svg = Plasma::Svg.new(@top.applet())
                    ^
SyntaxError: invalid syntax

Which is of course quite obvious, since the :: is a C++ operator and not Pthon. The @top is also not Python syntax. Furthermore, the call to 'preparePainter' is done before the function itself is defined, which is also impossible.

Cheers, Sybren Stüvel -- sybren AT stuvel DOT eu