def commandReceived(command_string): if command_string == 'Disconnected': print('Disconnected') return if command_string == 'op': print('Show window!') util.show() elif command_string == 'cl': print('Attempting to minimize window') util.hide() renderer.resetAll() else: renderer.select(command_string)
def select(self, direction): new_node = self.currentNode new_node = self.nodeInDirection(new_node, direction) if new_node == None or not (direction in self.currentGesture): print('Bad choice') return; self.oldNodes.append(self.currentNode) self.currentNode = new_node; # Turn on flag for animation here self.currentGesture = self.currentGesture[direction] if not isinstance(self.currentGesture, dict): print('Running application: ' + self.currentGesture) #a = subprocess.Popen a = os.system start_new_thread(a, ("\"" + self.currentGesture + "\"",)) self.resetAll() util.hide() time.sleep(1)