The CommandScript class encapsulates a particular PTS command script. More...
Public Member Functions | |
def | __init__ (self, packagename, scriptname) |
The constructor imports the script specified through its package and script names, and obtains the signature of its do() function. More... | |
def | description (self) |
This function returns the script's description, i.e. More... | |
def | doWithCommandLineArguments (self, arguments=None) |
This function inspects the arguments offered by the script's do() function, retrieves the appropriate values from the corresponding command line arguments using the standard argument parser, and finally invokes the function with these arguments. More... | |
def | name (self) |
This function returns the script's command name, i.e. More... | |
Private Attributes | |
_dofunction | |
_name | |
_signature | |
The CommandScript class encapsulates a particular PTS command script.
It offers functions to obtain information such as the script's name and description, and to execute its do() function using the current command line arguments.#
def pts.do.command.CommandScript.__init__ | ( | self, | |
packagename, | |||
scriptname | |||
) |
The constructor imports the script specified through its package and script names, and obtains the signature of its do() function.
def pts.do.command.CommandScript.description | ( | self | ) |
This function returns the script's description, i.e.
the return value annotation of its do() function.
def pts.do.command.CommandScript.doWithCommandLineArguments | ( | self, | |
arguments = None |
|||
) |
This function inspects the arguments offered by the script's do() function, retrieves the appropriate values from the corresponding command line arguments using the standard argument parser, and finally invokes the function with these arguments.
def pts.do.command.CommandScript.name | ( | self | ) |
This function returns the script's command name, i.e.
its package and script names joined by a forward slash.