Derive the options which are valid for this application.
Examine the methods defined for this class to
learn what options the developer wants to use. Options
can be added by defining an optionHandler method with a
name like optionHandler_
appInit
appInit ( self )
Override this method to perform application initialization.
This hook may be easier to override than the __init__ method,
since it takes no parameters.
Given the information learned through self.__learnValidOpts__,
construct a list to be passed to getopt to set the valid
long form option syntax.
main
main ( self, args )
Main body of your application.
This is the main portion of the app, and is run after all of
the arguments are processed. Override this method to implment
the primary processing section of your application.
methodNameFromOption
methodNameFromOption ( self, option )
Given the name of an option, construct
and return the name of the method to handle it.
methodReferenceFromName
methodReferenceFromName ( self, methodName )
Return a reference to the method with the given name.
optionHandler_q
optionHandler_q ( self )
Turn on quiet mode.
optionHandler_v
optionHandler_v ( self )
Increment the verbose level.
Higher levels are more verbose.
The default is 1.
run
run ( self )
Entry point.
Process options and execute callback functions as needed.
This method should not need to be overridden, if the main()
method is defined.
scanClassForOptions
scanClassForOptions ( self, cRef )
Scan through the inheritence hierarchy to find option handlers.
Given the information learned through self.__learnValidOpts__,
construct a string to be passed to getopt to set the valid
single character option syntax.
showHelp
showHelp ( self, errorMessage=None )
Display help message when error occurs.
If they made a syntax mistake, just
show them how to use the program. Otherwise,
show the full help message.