TaurusApplication
¶

-
class
TaurusApplication
(*args, **kwargs)[source]¶ Bases:
PyQt4.QtGui.QApplication
,taurus.core.util.log.Logger
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 (recommended), 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 it is not explicitly passed (not recommended), a default parser will be assumed with the default taurus options.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_())
-
basicConfig
(log_file_name=None, maxBytes=10000000.0, backupCount=5, with_gui_exc_handler=True)[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