summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <tsdgeos@terra.es>2011-11-09 19:30:05 (GMT)
committerAlbert Astals Cid <tsdgeos@terra.es>2011-11-09 19:31:13 (GMT)
commit23b6cb0404d586104dcbfac79476183a462829e8 (patch)
tree52229ae186cd53191109fa05be2dcee0ee100b7e
parent77b1374b99ee91d23d8802dd1dec9a5f630e919a (diff)
Make python scriptengine installable if python3 is your main python
REVIEW: 103096
-rw-r--r--plasma/generic/scriptengines/python/plasma_importer.py2
-rw-r--r--plasma/generic/scriptengines/python/plasmascript.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/plasma/generic/scriptengines/python/plasma_importer.py b/plasma/generic/scriptengines/python/plasma_importer.py
index c90e0d2..145a77b 100644
--- a/plasma/generic/scriptengines/python/plasma_importer.py
+++ b/plasma/generic/scriptengines/python/plasma_importer.py
@@ -104,7 +104,7 @@ class PlasmaImporter(object):
mod.__path__ = [self.marker]
if code is not None:
try:
- exec code in mod.__dict__
+ exec(code) in mod.__dict__
finally:
code.close()
return mod
diff --git a/plasma/generic/scriptengines/python/plasmascript.py b/plasma/generic/scriptengines/python/plasmascript.py
index 34fdfc0..c3759cf 100644
--- a/plasma/generic/scriptengines/python/plasmascript.py
+++ b/plasma/generic/scriptengines/python/plasmascript.py
@@ -90,10 +90,10 @@ class Applet(QObject):
return QGraphicsWidget.shape(self.applet)
def initExtenderItem(self, item):
- print "Missing implementation of initExtenderItem in the applet " + \
+ print("Missing implementation of initExtenderItem in the applet " + \
item.config().readEntry('SourceAppletPluginName', '').toString() + \
"!\nAny applet that uses extenders should implement initExtenderItem to " + \
- "instantiate a widget."
+ "instantiate a widget.")
def saveState(self, config):
pass