def listen(self):
        """Starts the listen loop. If threading is enabled, then the loop will
        be started in its own thread.

        Args:
          None

        Returns:
          None

        """

        self.listening = True
        if self.threading:
            from threading import Thread
            self.listen_thread = Thread(target=self.listen_loop)
            self.listen_thread.daemon = True
            self.listen_thread.start()

            self.scheduler_thread = Thread(target=self.scheduler)
            self.scheduler_thread.daemon = True
            self.scheduler_thread.start()

        else:
            self.listen_loop()
def listen ( self ) : self . listening = True if self . threading : from threading import Thread self . listen_thread = Thread ( target = self . listen_loop ) self . listen_thread . daemon = True self . listen_thread . start ( ) self . scheduler_thread = Thread ( target = self . scheduler ) self . scheduler_thread . daemon = True self . scheduler_thread . start ( ) else : self . listen_loop ( )
Starts the listen loop. If threading is enabled, then the loop will
        be started in its own thread.

        Args:
          None

        Returns:
          None