TaurusApplication

Inheritance diagram of TaurusApplication
class TaurusApplication(*args, **kwargs)[source]

A QApplication that performs some taurus-specific initializations and (optionally but deprecated) also parses the command line for taurus options.

The optional keyword parameters:
  • app_name: (str) application name

  • app_version: (str) application version

  • org_name: (str) organization name

  • org_domain: (str) organization domain

  • cmd_line_parser (None [or DEPRECATED optparse.OptionParser])

If cmd_line_parser is explicitly set to None, no parsing will be done at all. If a optparse.OptionParser instance is passed as cmd_line_parser (deprecated), it will be used for parsing the command line arguments. If cmd_line_parser is not explicitly passed, the behaviour will depend on the value of tauruscustomsettings.IMPLICIT_OPTPARSE (which by default is False, indicating that no parsing is done).

Simple example:

import sys
from taurus.qt.qtgui.application import TaurusApplication
import taurus.qt.qtgui.display

app = TaurusApplication(cmd_line_parser=None)

w = taurus.qt.qtgui.display.TaurusLabel()
w.model = 'sys/tg_test/1/double_scalar'
w.show()

sys.exit(app.exec_())

Import from taurus.qt.qtgui.application as:

from taurus.qt.qtgui.application import TaurusApplication
basicConfig(log_file_name=None, maxBytes=10000000.0, backupCount=5, with_gui_exc_handler=True)[source]
static exec_() int[source]
get_command_line_args()[source]

Returns the list of arguments that resulted from parsing the command line parameters.

Returns:

the command line arguments

Return type:

list of strings

get_command_line_options()[source]

Returns the optparse.Option that resulted from parsing the command line parameters.

Returns:

the command line options

Return type:

optparse.Option

get_command_line_parser()[source]

Returns the optparse.OptionParser used to parse the command line parameters.

Returns:

the parser used in the command line

Return type:

optparse.OptionParser

setTaurusStyle(styleName)[source]

Sets taurus application style to the given style name

Parameters:

styleName (str) – the new style name to be applied