Package glue :: Package ligolw :: Module param
[hide private]
[frames] | no frames]

Module param

source code

High-level support for Param elements.


Version: git id 8cbd1b7187ce3ed9a825d6ed11cc432f3cfde9a5

Date: 2017-12-05 15:29:36 +0000

Author: Kipp Cannon <kipp.cannon@ligo.org>

Classes [hide private]
  Param
High-level Param element.
Functions [hide private]
 
get_param(xmldoc, name)
Scan xmldoc for a param named name.
source code
 
get_pyvalue(xml, name)
Convenience wrapper for get_param() that recovers an instance of a Python builtin type from a Param element.
source code
 
use_in(ContentHandler)
Modify ContentHandler, a sub-class of glue.ligolw.LIGOLWContentHandler, to cause it to use the Param class defined in this module when parsing XML documents.
source code
Variables [hide private]
  __package__ = 'glue.ligolw'
Function Details [hide private]

get_param(xmldoc, name)

source code 

Scan xmldoc for a param named name. Raises ValueError if not exactly 1 such param is found.

use_in(ContentHandler)

source code 

Modify ContentHandler, a sub-class of glue.ligolw.LIGOLWContentHandler, to cause it to use the Param class defined in this module when parsing XML documents.

Example:

>>> from glue.ligolw import ligolw
>>> def MyContentHandler(ligolw.LIGOLWContentHandler):
...     pass
...
>>> use_in(MyContentHandler)