Module contains the ViewerApplication class

class tuiview.viewerapplication.TuiViewArgumentParser[source]

Same as argparse.ArgumentParser but overrides exit() and error() so we can show a message box if required.

error(message: string)[source]

Prints a usage message incorporating the message to stderr and exits.

If you override this in a subclass, it should not return – it should either exit or raise an exception.

exit(status=0, message=None)[source]
class tuiview.viewerapplication.ViewerApplication(*args: Any, **kwargs: Any)[source]

Main class for application


Plugins need to be able to save an instance of their signal handling object so it doesn’t get cleaned up by Python’s garbage collection. There are a number of ways to address this, but this seems the cleanest.

Get an instance of this ViewerApplication class in the plugin by using the:

app = QApplication.instance()



Get commandline arguments[source]

Call this function to instantiate an instance of ViewerApplication and have the command line parameters inspected etc and app run


If in gui mode, show message box with error and exit with 1 Otherwise raise SystemExit with msg