def loop(self):
        """
        Event loop
        """
        # Bring app to top
        self._app.finishLaunching()
        self._app.activateIgnoringOtherApps_(True)

        # Main loop
        AppHelper.runEventLoop(self._argv)
Exemple #2
0
    def loop(self):
        """
        Event loop
        """
        # Bring app to top
        self._app.finishLaunching()
        self._app.activateIgnoringOtherApps_(True)

        # Main loop
        AppHelper.runEventLoop(self._argv)
    def run(self, method, *args, **kwargs):
        """
        Runs the given method in the main thread

        :param method: The method to call
        :param args: Method arguments
        :param kwargs: Method keyword arguments
        :return: The result of the method
        """
        # Make an event object
        event = utils.EventData()

        # Call the runner
        AppHelper.callAfter(self.__ui_runner, event, method, args, kwargs)

        # Wait for it
        return event.wait()
Exemple #4
0
    def run(self, method, *args, **kwargs):
        """
        Runs the given method in the main thread

        :param method: The method to call
        :param args: Method arguments
        :param kwargs: Method keyword arguments
        :return: The result of the method
        """
        # Make an event object
        event = utils.EventData()

        # Call the runner
        AppHelper.callAfter(self.__ui_runner, event, method, args, kwargs)

        # Wait for it
        return event.wait()
 def stop():
     """
     Stops the loop
     """
     AppHelper.stopEventLoop()
Exemple #6
0
 def stop():
     """
     Stops the loop
     """
     AppHelper.stopEventLoop()