diff --git a/YupanaActivity.py b/YupanaActivity.py index 591426a..2ebd4c1 100644 --- a/YupanaActivity.py +++ b/YupanaActivity.py @@ -50,7 +50,7 @@ def __init__(self, handle): """ Initialize the toolbars and the yupana """ try: super(YupanaActivity, self).__init__(handle) - except dbus.exceptions.DBusException, e: + except dbus.exceptions.DBusException as e: _logger.error(str(e)) self.nick = profile.get_nick_name() diff --git a/activity/activity.info b/activity/activity.info index 8e6a97b..02ab268 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -3,7 +3,7 @@ name = Yupana activity_version = 17 license = GPLv3 bundle_id = org.sugarlabs.YupanaActivity -exec = sugar-activity YupanaActivity.YupanaActivity +exec = sugar-activity3 YupanaActivity.YupanaActivity icon = activity-yupana show_launcher = yes summary = Incan calculator diff --git a/sprites.py b/sprites.py index d1a4562..600c187 100644 --- a/sprites.py +++ b/sprites.py @@ -347,7 +347,7 @@ def draw(self, cr=None): self.rect[3]) cr.fill() else: - print 'sprite.draw: source not a pixbuf (%s)' % (type(img)) + print('sprite.draw: source not a pixbuf (%s)' % (type(img))) if len(self.labels) > 0: self.draw_label(cr) @@ -459,5 +459,5 @@ def get_pixel(self, pos, i=0): else: return(-1, -1, -1, -1) except IndexError: - print "Index Error: %d %d" % (len(array), offset) + print("Index Error: %d %d" % (len(array), offset)) return(-1, -1, -1, -1) diff --git a/utils.py b/utils.py index 81a76f8..6db1469 100644 --- a/utils.py +++ b/utils.py @@ -10,7 +10,7 @@ # Foundation, 51 Franklin Street, Suite 500 Boston, MA 02110-1335 USA -from StringIO import StringIO +from io import StringIO import json json.dumps from json import load as jload diff --git a/yupana.py b/yupana.py index 88920e8..c944aae 100644 --- a/yupana.py +++ b/yupana.py @@ -249,7 +249,7 @@ def _set_label(self, string): def _button_press_cb(self, win, event): win.grab_focus() - x, y = map(int, event.get_coords()) + x, y = list(map(int, event.get_coords())) spr = self._sprites.find_sprite((x, y)) if spr == None: @@ -522,5 +522,5 @@ def svg_str_to_pixbuf(svg_string): pixbuf = pl.get_pixbuf() return pixbuf except: - print svg_string + print(svg_string) return None