(self)
Process any commands being sent from the GUI.
Process any commands being sent from the GUI.
Process any commands being sent from the GUI .
def process_gui(self):
        """Process any commands being sent from the GUI."""
        if self.gui is None:
            return

        while self.gui.queue:
            command = self.gui.queue.pop(0)

            # Commands that must be executed
            if command in self.mapping_important:
                self.mapping_important[command]()

            # Commands that may only run if not paused
            elif command in self.mapping_pausable:
                if self.state != ThreadState.Paused:
                    self.mapping_pausable[command]()
def process_gui ( self ) : if self . gui is None : return while self . gui . queue : command = self . gui . queue . pop ( 0 ) # Commands that must be executed if command in self . mapping_important : self . mapping_important [ command ] ( ) # Commands that may only run if not paused elif command in self . mapping_pausable : if self . state != ThreadState . Paused : self . mapping_pausable [ command ] ( )