def toggleCapture(self): ''' Capture button toggle handler ''' if self.captureActve: RegHandler.deactivate() self.captureActve = False self.capture_btn.config(text='Capture', image=IMAGES['link']) self.status_bar.config(text='Server has stopped') else: def activate(service=None): # set registry on windows try: RegHandler.activate(config.port, service) except: pass else: self.captureActve = True self.capture_btn.config(text='Stop', image=IMAGES['unlink']) self.status_bar.config(text=RUNMSG) if sys.platform == 'darwin': NetworkSelector.toggle(activate) else: activate()
def activate(service=None): # set registry on windows try: RegHandler.activate(config.port, service) except: pass else: self.captureActve = True self.capture_btn.config(text='Stop', image=IMAGES['unlink']) self.status_bar.config(text=RUNMSG)