Package gavo :: Package grammars :: Module customgrammar
[frames] | no frames]

Module customgrammar

source code

A grammar that imports a user-defined module and takes the RowIterator from there.

The module has to define a RowIterator derived from CustomRowIterator. It may define a function makeDataPack receiving the grammar as its argument and returning anything. This anything will then be available as self.grammar.dataPack to the row iterator. Use this for expensive, one-time preparations your row iterator has to perform.

Classes
  CustomGrammar
A Grammar with a user-defined row iterator taken from a module.
  CustomRowIterator
is a base class for custom row iterators.
Functions
 
getModuleName() source code
Variables
  __package__ = 'gavo.grammars'