DIRACScript

DIRAC script

class DIRAC.Core.Utilities.DIRACScript.DIRACScript

Bases: object

Decorator for providing command line executables

All console-scripts entrypoints in DIRAC and downstream extensions should be wrapped in this decorator to allow extensions to override any entry_point.

classmethod addDefaultOptionValue(option, value)

See addDefaultEntry().

alreadyInitialized = False
classmethod disableCS()

See disableCS().

classmethod enableCS()

See enableCS().

classmethod getExtraCLICFGFiles()

See getExtraCLICFGFiles().

classmethod getPositionalArgs(group=False)

See getPositionalArguments().

classmethod getUnprocessedSwitches()

See getUnprocessedSwitches().

classmethod initialize(script=False, ignoreErrors=False, initializeMonitor=False, enableCommandLine=False)

initialization

Parameters
  • script (str) – script name

  • ignoreErrors (bool) – ignore errors when loading configuration

  • initializeMonitor (bool) – to use monitoring

  • enableCommandLine (bool) – enable parse command line

localCfg = <DIRAC.ConfigurationSystem.Client.LocalConfiguration.LocalConfiguration object>
classmethod parseCommandLine(script=False, ignoreErrors=False, initializeMonitor=False)

Parse command line

Parameters
  • script (str) – script name

  • ignoreErrors (bool) – ignore errors when loading configuration

  • initializeMonitor (bool) – to use monitoring

classmethod registerArgument(description, mandatory=True, values=None, default=None)

See registerCmdArg().

classmethod registerSwitch(showKey, longKey, helpString, callback=False)

See registerCmdOpt().

classmethod registerSwitches(switches)

Register switches

Parameters

switches (list) – switches

scriptName = None
classmethod setUsageMessage(usageMessage)

See setUsageMessage().

classmethod showHelp(dummy=False, exitCode=0)

See showHelp().