view light8/rsn.py @ 62:2f2eb802e93d

stage shows levels now. aims have blue halo for easy recognition. stage shows levels now. aims have blue halo for easy recognition. old dummy config stored
author dmcc
date Tue, 09 Jul 2002 08:35:27 +0000
parents 001646cd5349
children ab0be21b549b
line wrap: on
line source

#!/usr/bin/env python
from __future__ import nested_scopes

from Tix import *
from signal import signal, SIGINT
import io
from uihelpers import *
from Fader import Fader
from Lightboard import Lightboard

if len(sys.argv) >= 2:
    DUMMY = 0
    print "This is the real thing, baby"
    window_title = "Light 8.8 (On Air)"
else:
    DUMMY = 1
    print "Dummy mode"
    window_title = "Light 8.8 (Bogus)"

root = Tk()
root.wm_title(window_title)
root.wm_geometry('+462+470')
root.tk_focusFollowsMouse()

parportdmx = io.ParportDMX(DUMMY)

mr_lightboard = Lightboard(root,parportdmx,DUMMY)

signal(SIGINT, mr_lightboard.quit)


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>"))

root.mainloop() # Receiver switches main

#import profile
#profile.run("root.mainloop()","profile/idlemanysubs")