Mercurial > code > home > repos > light9
diff light8/rsn.py @ 0:45b12307c695
Initial revision
author | drewp |
---|---|
date | Wed, 03 Jul 2002 09:37:57 +0000 |
parents | |
children | f974a462133f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/light8/rsn.py Wed Jul 03 09:37:57 2002 +0000 @@ -0,0 +1,62 @@ +#!/usr/bin/python +from __future__ import nested_scopes + +from Tix import * +from signal import signal, SIGINT +from uihelpers import * +from Fader import Fader +from Lightboard import Lightboard +import time # time is on our side + +if len(sys.argv) >= 2: + DUMMY = 0 + print "Light 8.8: This is the real thing, baby" + window_title = "Light 8.8 (On Air)" +else: + DUMMY = 1 + print "Light 8.8: Dummy mode" + window_title = "Light 8.8 (Bogus)" + +root = Tk() +root.wm_title(window_title) +root.wm_geometry('+462+470') +root.tk_focusFollowsMouse() + + +if not DUMMY: + # this turns the parportdmx from dummy to live + print "Light 8.8: Preparing DMX interface..." + parportdmx.golive() + +print "Light 8.8: And this...is Mr. Lightboard" +mr_lightboard = Lightboard(root,DUMMY) +# root.tk_setPalette('gray40') + +signal(SIGINT, mr_lightboard.quit) + +# +# start net slider server in separate thread +# +print "Light 8.8: External input server DELETED!" +#import ExternalInput, thread +#thread.start_new_thread(ExternalInput.start_server,()) + +bindkeys(root,'<Escape>', mr_lightboard.quit) + +root.bind_class("all","<ButtonPress-4>",lambda ev: eventtoparent(ev,"<ButtonPress-4>")) +root.bind_class("all","<ButtonPress-5>",lambda ev: eventtoparent(ev,"<ButtonPress-5>")) + +print 'Light 8.8: "Uh...Shiny McShine?"' +root.update_idletasks() + +if 1: + while 1: + root.update() # Receiver switches main + time.sleep(0.01) +else: + sys.path.append("/home/drewp/projects/editor/pour") + from utils import runstats + runstats("root.mainloop()") + +#import profile +#profile.run("root.mainloop()","profile/idlemanysubs")