build_content_handler#

gwpy.io.ligolw.build_content_handler(
parent: type[PartialLIGOLWContentHandler],
filter_func: Callable[[str, AttributesImpl], bool],
) type[PartialLIGOLWContentHandler][source]#

Build a ContentHandler with a given filter.

Parameters:
parenttype, subclass of xml.sax.handler.ContentHandler

a class of contenthandler to use

filter_funccallable

the filter function to pass to the content handler creation

Returns:
contenthandlersubclass of parent

a new content handler that applies the filter function and the default parsing extras from _wrap_content_handler().