CHAP.reader
¶
File : reader.py
Author : Valentin Kuznetsov
Define a generic Reader
object.
Module Contents¶
Classes¶
Generic file reader. |
|
User based option parser |
Functions¶
Main function |
API¶
- class CHAP.reader.Reader¶
Bases:
CHAP.pipeline.PipelineItem
Generic file reader.
The job of any
Reader
in aPipeline
is to provide data stored in a file to the nextPipelineItem
. Note that aReader
used on its own disrupts the flow of data in aPipeline
– it does not receive or pass along any data returned by the previousPipelineItem
.Initialization
Constructor of PipelineItem class
- read(filename)¶
Read and return the contents of
filename
as text- Parameters:
filename (str) – Name of file to read from
- Returns:
entire contents of the file
- Return type:
str
- class CHAP.reader.OptionParser¶
User based option parser
Initialization
- CHAP.reader.main(opt_parser=OptionParser)¶
Main function