The CommandScript class encapsulates a particular PTS command script. More...
Public Member Functions | |
| __init__ (self, packagename, scriptname) | |
| The constructor imports the script specified through its package and script names, and obtains the signature of its do() function. | |
| description (self) | |
| This function returns the script's description, i.e. | |
| 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. | |
| name (self) | |
| This function returns the script's command name, i.e. | |
Protected Attributes | |
| _dofunction | |
| str | _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.#
| 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.
| pts.do.command.CommandScript.description | ( | self | ) |
This function returns the script's description, i.e.
the return value annotation of its do() function.
| 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.
| 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.