diff --git a/light8/io.py b/light8/io.py --- a/light8/io.py +++ b/light8/io.py @@ -1,9 +1,13 @@ + + +from parport import * DUMMY=1 def init(DUMMY_in): global DUMMY if not DUMMY_in: + getparport() DUMMY=0 diff --git a/light8/panels.py b/light8/panels.py --- a/light8/panels.py +++ b/light8/panels.py @@ -43,23 +43,23 @@ class Console: self.frame.focus() class Leveldisplay: - def __init__(self,parent,_oldlevels): - global channel_levels + def __init__(self,parent,_oldlevels,channel_levels): frames = (make_frame(parent), make_frame(parent)) - channel_levels=[] + channel_levels[:]=[] for channel in range(1, 69): f=Frame(frames[channel > 34]) Label(f,text=str(channel), width=3, bg='lightPink', font=stdfont, padx=0, pady=0, bd=0, height=1).pack(side='left') Label(f,text=Patch.get_channel_name(channel), width=8, font=stdfont, anchor='w', padx=0, pady=0, bd=0, height=1).pack(side='left') - l=Label(f,text=_oldlevels[channel-1], width=3, bg='lightBlue', + l=Label(f, width=3, bg='lightBlue', #text=_oldlevels[channel-1], font=stdfont, anchor='e', padx=1, pady=0, bd=0, height=1) l.pack(side='left') colorlabel(l) channel_levels.append(l) f.pack(side='top') + # channel_levels is an output - changelevel will use it to access these labels class Subpanels: def __init__(self,scenesparent,effectsparent,scalelevels,Subs,xfader,changelevel): diff --git a/light8/rsn.py b/light8/rsn.py --- a/light8/rsn.py +++ b/light8/rsn.py @@ -2,7 +2,6 @@ from __future__ import nested_scopes from Tkinter import * -from parport import * from time import sleep from signal import * import sys, thread, cPickle @@ -55,7 +54,7 @@ def changelevel(*args): levels[ch-1] = max(levels[ch-1], fadelev) levels = [int(l) for l in levels] - + for lev,lab,oldlev in zip(levels, channel_levels, _oldlevels): if lev != oldlev: lab.config(text="%d" % lev) @@ -112,7 +111,7 @@ def buildinterface(*args): leveldisplay=toplevelat(873,400) leveldisplay.bind('', sys.exit) - Leveldisplay(leveldisplay,_oldlevels) + Leveldisplay(leveldisplay,_oldlevels,channel_levels) Console()