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

Class TimeChecker

TypeChecker --+
              |
             TimeChecker


Accepts a date specification.

Will also accept a time specification and apply it as a delta from _now_. converts to the standard seconds-from_epoch.
Method Summary
  __init__(self, typename, typeargs)
Initializes the TypeChecker.
int check(self, arg)
Assumes the argument is valid python code.

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 valid python code. It evaluates the code and returns the result.
Parameters:
arg - the time argument
           (type=string)
Returns:
the number of seconds since the epoch
           (type=int)
Raises:
ParserException - if the arg is not a valid time
Overrides:
lyntin.argparser.TypeChecker.check

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