Changeset - 2193eab0650b
[Not reviewed]
default
0 1 0
Drew Perttula - 19 years ago 2006-06-16 19:34:30
drewp@bigasterisk.com
add startup logging to curvecalc
1 file changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
bin/curvecalc
Show inline comments
 
@@ -9,12 +9,16 @@ import xmlrpclib,time,socket,sys,textwra
 
from bisect import bisect_left,bisect,bisect_right
 
import Tkinter as tk
 
from dispatch import dispatcher
 
from twisted.internet import reactor,tksupport
 
import twisted
 
from twisted.web.xmlrpc import Proxy
 
import logging
 
log = logging.getLogger()
 
logging.basicConfig(format="%(asctime)s %(levelname)-5s %(name)s %(filename)s:%(lineno)d: %(message)s")
 
log.setLevel(logging.DEBUG)
 

	
 
import run_local
 
from light9 import Submaster, dmxclient, networking, showconfig
 
from light9.TLUtility import make_attributes_from_args, dict_subset
 
from light9.zoomcontrol import Zoomcontrol
 
from light9.curve import Curve, Curveview, Curveset, Curvesetview
 
@@ -318,12 +322,13 @@ options,args = parser.parse_args()
 

	
 
try:
 
    song = args[0]
 
except IndexError:
 
    raise SystemExit("song name is required, e.g. '05-mix'")
 

	
 
log.debug("music")
 
music=Music()
 

	
 
zc = Zoomcontrol(root)
 
zc.pack(side='top',fill='x')
 

	
 
curveset = Curveset()
 
@@ -344,12 +349,13 @@ curveset.load(basename=os.path.join(show
 
subterms = []
 
sub_commands_tk(root, curveset, subterms, root, ssv).pack(side='top',fill='x')
 

	
 
add_subterms_from_file(showconfig.subtermsForSong(song),
 
                       curveset, subterms, root, ssv)
 

	
 
log.debug("output")
 
out = Output(subterms, music)
 

	
 
def savekey(*args):
 
    print "saving",song
 
    savesubterms(showconfig.subtermsForSong(song),subterms)
 
    curveset.save(basename=os.path.join(showconfig.curvesDir(),song))
 
@@ -370,12 +376,13 @@ for helpline in ["Bindings: C-s save sub
 
#twisted.python.log.addObserver(logprint)
 

	
 
root.bind("<Control-Key-q>",lambda ev: reactor.stop)
 
root.bind("<Destroy>",lambda ev: reactor.stop)
 
root.protocol('WM_DELETE_WINDOW', reactor.stop)
 
tksupport.install(root,ms=20)
 
log.debug("run")
 
if 0:
 
    sys.path.append("/home/drewp/projects/cuisine/pour")
 
    from utils import runstats
 
    runstats("reactor.run()")
 
else:
 
    reactor.run()
0 comments (0 inline, 0 general)