Mercurial > code > home > repos > light9
diff light8/rsn.py @ 29:f595fdd4c548
minor cleanups, convert parallel port controller to a class
author | dmcc |
---|---|
date | Sun, 07 Jul 2002 10:41:06 +0000 |
parents | b0342f9ee328 |
children | e9d2e7754fd9 |
line wrap: on
line diff
--- a/light8/rsn.py Sun Jul 07 10:17:00 2002 +0000 +++ b/light8/rsn.py Sun Jul 07 10:41:06 2002 +0000 @@ -36,7 +36,7 @@ get_data() -io.init(DUMMY) +parportdmx = io.ParportDMX(DUMMY) class Lightboard: def __init__(self, master): @@ -112,7 +112,7 @@ self.oldlevels = levels[:] - io.sendlevels(levels) + parportdmx.sendlevels(levels) def load(self): try: @@ -136,10 +136,10 @@ print "IOError: Couldn't load prefs (%s)" % filename except EOFError: print "EOFrror: Couldn't load prefs (%s)" % filename - + except: + print "BigTrouble: Couldn't load prefs (%s)" % filename def make_sub(self, name): i = 1 - # name = console_entry.get() # read from console if not name: print "Enter sub name in console." return @@ -188,13 +188,11 @@ for name, lev in scalelevels.items()]) self.substate = dict([(name, subobj.get_state()) for name, subobj in subs]) + # print "substate", self.substate mr_lightboard = Lightboard(root) signal(SIGINT, mr_lightboard.quit) bindkeys(root,'<Escape>', mr_lightboard.quit) -# bindkeys(root,'<q>', quit) -# bindkeys(root,'<r>', refresh) -# bindkeys(root,'<s>', make_sub) root.mainloop() # Receiver switches main