Skip to content

Commit

Permalink
Run 2to3
Browse files Browse the repository at this point in the history
  • Loading branch information
JuiP authored and quozl committed May 21, 2020
1 parent cef6373 commit 3601020
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion activity/activity.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = Pukllanapac
activity_version = 13
license = GPLv3+;MIT
bundle_id = org.sugarlabs.PukllanapacActivity
exec = sugar-activity PukllanapacActivity.PukllanapacActivity
exec = sugar-activity3 PukllanapacActivity.PukllanapacActivity
icon = activity-pukllanapac
show_launcher = yes
tags = Game; Maths
Expand Down
2 changes: 1 addition & 1 deletion card.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def set_orientation(self, r):

def rotate_180(self):
""" Rotate a tile 180 degrees """
print "rotate 180"
print("rotate 180")
r = 0
while r < 180:
self.rotate_ccw()
Expand Down
2 changes: 1 addition & 1 deletion grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def swap(self, a, b, shape='rectangle'):
if shape == 'hexagon':
if HEX_ORIENTATION[GRID_TO_HEX[ai]] != \
HEX_ORIENTATION[GRID_TO_HEX[bi]]:
print 'rotating 180: ', ai, bi, self.grid[ai], self.grid[bi]
print('rotating 180: ', ai, bi, self.grid[ai], self.grid[bi])
self.card_table[self.grid[ai]].rotate_180()
self.card_table[self.grid[bi]].rotate_180()

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from sugar3.activity import bundlebuilder
if __name__ == "__main__":
bundlebuilder.start()
Expand Down
4 changes: 2 additions & 2 deletions sprites.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def redraw_sprites(self, area=None, cr=None):
else:
self.cr = cr
if cr is None:
print 'sprites.redraw_sprites: no Cairo context'
print('sprites.redraw_sprites: no Cairo context')
return
for spr in self.list:
if area == None:
Expand Down Expand Up @@ -331,7 +331,7 @@ def inval(self):
def draw(self, cr=None):
''' Draw the sprite (and label) '''
if cr is None:
print 'sprite.draw: no Cairo context.'
print('sprite.draw: no Cairo context.')
return
for i, surface in enumerate(self.cached_surfaces):
cr.set_source_surface(surface,
Expand Down
4 changes: 2 additions & 2 deletions window.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def __init__(self, canvas, path, parent=None):

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()))
self.start_drag = [x, y]
spr = self.sprites.find_sprite((x, y))
if spr is None:
Expand All @@ -96,7 +96,7 @@ def _button_press_cb(self, win, event):

def _button_release_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 is None:
self.press = None
Expand Down

0 comments on commit 3601020

Please sign in to comment.