Mercurial > code > home > repos > light9
diff bin/musictime @ 1859:f066d6e874db
2to3 with these fixers: all idioms set_literal
Ignore-this: cbd28518218c2f0ddce8c4f92d3b8b33
author | drewp@bigasterisk.com |
---|---|
date | Wed, 22 May 2019 00:08:22 +0000 |
parents | 7772cc48e016 |
children | 3c523c71da29 |
line wrap: on
line diff
--- a/bin/musictime Tue May 21 23:56:12 2019 +0000 +++ b/bin/musictime Wed May 22 00:08:22 2019 +0000 @@ -2,7 +2,7 @@ import run_local import light9.networking -import Tkinter as tk +import tkinter as tk import time import restkit, jsonlib @@ -18,8 +18,8 @@ try: playtime = jsonlib.read(self.player.get("time").body_string(), use_float=True)['t'] - except restkit.RequestError, e: - print "Server error %s, waiting" % e + except restkit.RequestError as e: + print("Server error %s, waiting" % e) time.sleep(2) return playtime @@ -42,7 +42,7 @@ def print_time(evt, *args): self.timevar.set(self.get_music_time()) - print self.timevar.get(), evt.keysym + print(self.timevar.get(), evt.keysym) self.timelabel.bind('<KeyPress>', print_time) self.timelabel.bind('<1>', print_time)