CHAP.writer
¶
File : writer.py
Author : Valentin Kuznetsov
Define a generic Writer
object.
Module Contents¶
Classes¶
Generic file writer |
|
User based option parser |
Functions¶
Main function |
API¶
- class CHAP.writer.Writer¶
Bases:
CHAP.pipeline.PipelineItem
Generic file writer
The job of any
Writer
in aPipeline
is to receive input returned by a previousPipelineItem
, write its data to a particular file format, then return the same data unaltered so it can be used by a successivePipelineItem
.Initialization
Constructor of PipelineItem class
- write(data, filename)¶
Write the input data as text to a file.
- Parameters:
data (list[PipelineData]) – input data
filename (str) – Name of file to write to
- Returns:
contents of the input data
- Return type:
object
- class CHAP.writer.OptionParser¶
User based option parser
Initialization
- CHAP.writer.main(opt_parser=OptionParser)¶
Main function