Package lyntin :: Module argparser :: Class TimeSpanChecker
[show private | hide private]
[frames | no frames]

Class TimeSpanChecker

TypeChecker --+
              |
             TimeSpanChecker


Accepts an amount of time and converts it to a number of seconds.
Method Summary
  __init__(self, typename, typeargs)
Initializes the TypeChecker.
int check(self, arg)
Assumes the argument is a time span.

Method Details

__init__(self, typename, typeargs)
(Constructor)

Initializes the TypeChecker. Over-ridden by all the TypeChecker subclasses.
Parameters:
typename - the name of the type
           (type=string)
typeargs - the arguments passed to the TypeChecker to initialize it
           (type=tuple)
Overrides:
lyntin.argparser.TypeChecker.__init__ (inherited documentation)

check(self, arg)

Assumes the argument is a time span.
Parameters:
arg - the timespan
           (type=string)
Returns:
the number of seconds in the timespan
           (type=int)
Raises:
ParserException - if the timespan is invalid
Overrides:
lyntin.argparser.TypeChecker.check

Generated by Epydoc 2.1 on Mon Aug 9 09:17:41 2004 http://epydoc.sf.net