def main(): platform = Subs.getPlatform() if platform[0] == 'Windows': from ProcessW32 import isIdle if platform[1] in ['Vista', '7', '8']: from ProcessW32 import getCurrentJobVista as getCurrentJob elif platform[1] == 'XP': from ProcessW32 import getCurrentJobXP as getCurrentJob else: print 'Unsupported Windows version: %s %s'%(platform[0], platform[1]) return for x in xrange(1,20): print getCurrentJob() print isIdle() time.sleep(1)
def buildinterface(self): print "Light 8.8: Constructing interface..." for w in self.master.winfo_children(): w.destroy() print "\tstage" stage_tl = toplevelat('stage') s = stage.Stage(stage_tl) stage.createlights(s) s.setsubediting(self.subediting) s.pack() self.stage = s # save it sub_tl = toplevelat('sub') scene_tl = toplevelat('scenes') effect_tl = toplevelat('effect') print "\tslider patching -- It can't be turned off!" mapping_tl = toplevelat('mapping') self.slidermapper = ExtSliderMapper.ExtSliderMapper(mapping_tl, self.scalelevels, ExternalSliders(), self) self.slidermapper.pack() print "\tsubmaster control" self.subpanels = Subpanels(sub_tl, effect_tl, scene_tl, self, self.scalelevels, Subs, self.xfader, self.changelevel, self.subediting, Subs.longestsubname()) for n, lev in self.scalelevels.items(): self.lastsublevels[n] = lev.get() print "\tlevel display" leveldisplay_tl = toplevelat('leveldisplay') leveldisplay_tl.bind('<Escape>', sys.exit) self.leveldisplay = Leveldisplay(leveldisplay_tl, self.channel_levels) # I don't think we need this # for i in range(0,len(self.channel_levels)): # self.channel_levels[i].config(text=self.oldlevels[i]) # colorlabel(self.channel_levels[i]) print "\tconsole" Console(self) # root frame print "\tcontrol panel" self.master.configure(bg='black') controlpanel = Controlpanel(self.master, self.xfader, self.refresh, self.quit, self.toggle_jostle, self.nonzerosubs) print "\tcrossfader" xf=Frame(self.master) xf.pack(side='right') self.master.bind('<q>', self.quit) self.master.bind('<r>', self.refresh) leveldisplay_tl.bind('<q>', self.quit) leveldisplay_tl.bind('<r>', self.refresh) self.xfader.setupwidget(xf) controlpanel.pack() print "\tcue fader (skipped)" # cuefader_tl = toplevelat('cuefader') # cuefader = Fader(cuefader_tl, Subs.cues, self.scalelevels) # cuefader.pack() print "Light 8.8: Everything's under control"
def get_data(self,*args): Subs.reload_data(self.DUMMY) Patch.reload_data(self.DUMMY) print "Light 8.8:", len(Patch.patch), "dimmers patched" print "Light 8.8:", len(Subs.subs), "submasters loaded"