|Non-Confidential||PDF version||ARM DUI0446Z|
|Home > Debugging with Scripts > Defining the Run method for use case scripts|
The method named in the
$Run$ tag must have at least one parameter, called
options, which provides access to the script options.
... $Run$ mainMethod ...
def mainMethod(options): print "Running the main method"
It is possible to define an entry point to the use case that requires more than
one parameter. The definition of the
$Run$ tag only
defines the function name. The definition of the function within the script defines
how many parameters are needed.
... $Run$ main ...
# main method with positional arguments def main(options, filename, value): print "Running the main method" # Using the positional arguments supplied to the script. print "Using file: " + filename + " and value: " + value
In this example
main requires two parameters,
value which must be supplied on the command-line when the use case
script is run.