comparison light8/rsn.py @ 102:e04f7b552bcd

- scroll wheel works everywhere - scroll wheel works everywhere - interface is white on black - subs that start scenes are white - more status information, startup process kinda cleaned up
author dmcc
date Sun, 14 Jul 2002 08:01:24 +0000
parents a995fd1a8f03
children afbdae5e1359
comparison
equal deleted inserted replaced
101:a995fd1a8f03 102:e04f7b552bcd
8 from Fader import Fader 8 from Fader import Fader
9 from Lightboard import Lightboard 9 from Lightboard import Lightboard
10 10
11 if len(sys.argv) >= 2: 11 if len(sys.argv) >= 2:
12 DUMMY = 0 12 DUMMY = 0
13 print "This is the real thing, baby" 13 print "Light 8.8: This is the real thing, baby"
14 window_title = "Light 8.8 (On Air)" 14 window_title = "Light 8.8 (On Air)"
15 else: 15 else:
16 DUMMY = 1 16 DUMMY = 1
17 print "Dummy mode" 17 print "Light 8.8: Dummy mode"
18 window_title = "Light 8.8 (Bogus)" 18 window_title = "Light 8.8 (Bogus)"
19 19
20 root = Tk() 20 root = Tk()
21 root.wm_title(window_title) 21 root.wm_title(window_title)
22 root.wm_geometry('+462+470') 22 root.wm_geometry('+462+470')
23 root.tk_focusFollowsMouse() 23 root.tk_focusFollowsMouse()
24 24
25
25 parportdmx = io.ParportDMX() 26 parportdmx = io.ParportDMX()
26 27
27 if not DUMMY: 28 if not DUMMY:
28 # this turns the parportdmx from dummy to live 29 # this turns the parportdmx from dummy to live
30 print "Light 8.8: Preparing DMX interface..."
29 parportdmx.golive() 31 parportdmx.golive()
30 32
33 print "Light 8.8: And this...is Mr. Lightboard"
31 mr_lightboard = Lightboard(root,parportdmx,DUMMY) 34 mr_lightboard = Lightboard(root,parportdmx,DUMMY)
32 # root.tk_setPalette('gray40') 35 # root.tk_setPalette('gray40')
33 36
34 signal(SIGINT, mr_lightboard.quit) 37 signal(SIGINT, mr_lightboard.quit)
35 38
36 # 39 #
37 # start net slider server in separate thread 40 # start net slider server in separate thread
38 # 41 #
42 print "Light 8.8: External input server spawned"
39 import ExternalInput, thread 43 import ExternalInput, thread
40 thread.start_new_thread(ExternalInput.start_server,()) 44 thread.start_new_thread(ExternalInput.start_server,())
41 45
42 bindkeys(root,'<Escape>', mr_lightboard.quit) 46 bindkeys(root,'<Escape>', mr_lightboard.quit)
43 47
44 root.bind_class("all","<ButtonPress-4>",lambda ev: eventtoparent(ev,"<ButtonPress-4>")) 48 root.bind_class("all","<ButtonPress-4>",lambda ev: eventtoparent(ev,"<ButtonPress-4>"))
45 root.bind_class("all","<ButtonPress-5>",lambda ev: eventtoparent(ev,"<ButtonPress-5>")) 49 root.bind_class("all","<ButtonPress-5>",lambda ev: eventtoparent(ev,"<ButtonPress-5>"))
46 50
51 print 'Light 8.8: "Uh...Shiny McShine?"'
47 root.mainloop() # Receiver switches main 52 root.mainloop() # Receiver switches main
48 53
49 #import profile 54 #import profile
50 #profile.run("root.mainloop()","profile/idlemanysubs") 55 #profile.run("root.mainloop()","profile/idlemanysubs")