| Trees | Index | Help |
|
|---|
| Module argparser :: Class ChoiceChecker |
|
TypeChecker --+
|
ChoiceChecker
Allows for a value to come from a selection of different strings. Automatically expands to one of them if it is uniquely specified.
Typeargs should be a |-delimitted list of possibly values| Method Summary | |
|---|---|
Uses the typeargs to set the choices availble. | |
| int |
Checks the arg against a series of choices that were presented when this checker was instantiated. |
| Method Details |
|---|
__init__(self,
typename,
typeargs)
Uses the typeargs to set the choices availble.
|
check(self, args)Checks the arg against a series of choices that were presented when this checker was instantiated. So you could say that valid values of this argument are "high" and "low" and if the argument value the user passed in was "blue", then we would raise a ParserException since that's not a valid value.
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 1.1 on Mon Apr 28 21:11:24 2003 | http://epydoc.sf.net |