def callback(self, data): data = Yaml.decode_one(data) event = data['event'] if event == 'start': self.after_server_starts() elif event == 'closeButtonPressed': if Settings.get('execution', 'close_button_quits'): Quit.request_quit() elif Settings.get('execution', 'close_button_closes_window'): Visualizer.set_visible(False) else: # print(data) pass
def window(_, command='open'): if command not in ('close', 'open'): raise Exception('Don\'t understand command "window %s"' % command) Visualizer.set_visible(command == 'open')
def default_output(): from echomesh.output import Visualizer return Visualizer.instance()