comparison light8/rsn.py @ 0:45b12307c695

Initial revision
author drewp
date Wed, 03 Jul 2002 09:37:57 +0000
parents
children f974a462133f
comparison
equal deleted inserted replaced
-1:000000000000 0:45b12307c695
1 #!/usr/bin/python
2 from __future__ import nested_scopes
3
4 from Tix import *
5 from signal import signal, SIGINT
6 from uihelpers import *
7 from Fader import Fader
8 from Lightboard import Lightboard
9 import time # time is on our side
10
11 if len(sys.argv) >= 2:
12 DUMMY = 0
13 print "Light 8.8: This is the real thing, baby"
14 window_title = "Light 8.8 (On Air)"
15 else:
16 DUMMY = 1
17 print "Light 8.8: Dummy mode"
18 window_title = "Light 8.8 (Bogus)"
19
20 root = Tk()
21 root.wm_title(window_title)
22 root.wm_geometry('+462+470')
23 root.tk_focusFollowsMouse()
24
25
26 if not DUMMY:
27 # this turns the parportdmx from dummy to live
28 print "Light 8.8: Preparing DMX interface..."
29 parportdmx.golive()
30
31 print "Light 8.8: And this...is Mr. Lightboard"
32 mr_lightboard = Lightboard(root,DUMMY)
33 # root.tk_setPalette('gray40')
34
35 signal(SIGINT, mr_lightboard.quit)
36
37 #
38 # start net slider server in separate thread
39 #
40 print "Light 8.8: External input server DELETED!"
41 #import ExternalInput, thread
42 #thread.start_new_thread(ExternalInput.start_server,())
43
44 bindkeys(root,'<Escape>', mr_lightboard.quit)
45
46 root.bind_class("all","<ButtonPress-4>",lambda ev: eventtoparent(ev,"<ButtonPress-4>"))
47 root.bind_class("all","<ButtonPress-5>",lambda ev: eventtoparent(ev,"<ButtonPress-5>"))
48
49 print 'Light 8.8: "Uh...Shiny McShine?"'
50 root.update_idletasks()
51
52 if 1:
53 while 1:
54 root.update() # Receiver switches main
55 time.sleep(0.01)
56 else:
57 sys.path.append("/home/drewp/projects/editor/pour")
58 from utils import runstats
59 runstats("root.mainloop()")
60
61 #import profile
62 #profile.run("root.mainloop()","profile/idlemanysubs")