Python 2->3 syntax pass for wmladi and g15ladi

* wmladi won't run until the pywmdockapps C module is ported to Python 3
* g15ladi requires special hardware to test
This commit is contained in:
Yclept Nemo 2023-07-19 20:29:01 -04:00
parent 44176ace1e
commit 61f59ae812
2 changed files with 7 additions and 7 deletions

View File

@ -57,7 +57,7 @@ class g15composer (object):
while not os.access(self.pipe_filename, os.F_OK):
#print "Waiting pipe to appear..."
time.sleep(1)
self.pipe = file(self.pipe_filename, "w")
self.pipe = open(self.pipe_filename, "w")
os.remove(self.pipe_filename)
#print "pipe unlinked"
@ -189,8 +189,8 @@ class jackctl_g15(object):
status_line += " started in non-realtime mode"
else:
status_line += " stopped"
except Exception, e:
print repr(e)
except Exception as e:
print(repr(e))
status_line = "JACK cannot be connected"
if self.jack:
self.g15.clear(False)

8
wmladi
View File

@ -163,10 +163,10 @@ class wmladi (wmoo.Application, LadiMenu, LadiApp):
self.clear_line(5)
self.started = False
self.clear_diagnose_text()
except Exception, e:
except Exception as e:
self.set_diagnose_text(repr(e))
if debug:
print repr (e)
print(repr(e))
self.set_line(0, "JACK")
self.set_line(1, "is sick")
self.clear_line(2)
@ -243,8 +243,8 @@ class wmladi (wmoo.Application, LadiMenu, LadiApp):
data=None,
button=3,
activate_time=0)
except Exception, e:
print repr(e)
except Exception as e:
print(repr(e))
pass
if __name__ == '__main__':