(self, pause=None)
Pause or unpause the processing of events.
        When paused, events will be received but ignored.

        Parameters:
            pause (bool): If the script should be paused or not.
                If None, it will reverse the existing value.
                Default: None
Pause or unpause the processing of events.
        When paused, events will be received but ignored.
Pause or unpause the processing of events . When paused events will be received but ignored .
def pause(self, pause=None):
        """Pause or unpause the processing of events.
        When paused, events will be received but ignored.

        Parameters:
            pause (bool): If the script should be paused or not.
                If None, it will reverse the existing value.
                Default: None
        """
        if pause is None:
            try:
                pause = self.state != ThreadState.Paused
            except AttributeError:
                pause = True

        if pause:
            self.state = ThreadState.Paused
            self.send_gui_event(ThreadEvent.Paused)
            self.send_process_event(ProcessCommand.Pause)
        else:
            self.state = ThreadState.Running
            self.send_gui_event(ThreadEvent.Unpaused)
def pause ( self , pause = None ) : if pause is None : try : pause = self . state != ThreadState . Paused except AttributeError : pause = True if pause : self . state = ThreadState . Paused self . send_gui_event ( ThreadEvent . Paused ) self . send_process_event ( ProcessCommand . Pause ) else : self . state = ThreadState . Running self . send_gui_event ( ThreadEvent . Unpaused )