| Trees | Indices | Help |
|---|
|
|
object --+
|
SequenceWriter --+
|
SequentialSequenceWriter
This class should be subclassed.
It is intended for sequential file formats with an (optional) header, repeated records, and an (optional) footer.
In this case (as with interlaced file formats), the user may simply call the write_file() method and be done.
However, they may also call the write_header(), followed by multiple calls to write_record() and/or write_records() followed finally by write_footer().
Users must call write_header() and write_footer() even when the file format concerned doesn't have a header or footer. This is to try and make life as easy as possible when switching the output format.
Note that write_header() cannot require any assumptions about the number of records.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Creates the writer object. Use the method write_file() to actually record your sequence records.
|
Write a single record to the output file. record - a SeqRecord object Once you have called write_header() you can call write_record() and/or write_records() as many times as needed. Then call write_footer() and close(). |
Write multiple record to the output file. records - A list or iterator returning SeqRecord objects Once you have called write_header() you can call write_record() and/or write_records() as many times as needed. Then call write_footer() and close(). Returns the number of records written. |
Use this to write an entire file containing the given records. records - A list or iterator returning SeqRecord objects This method can only be called once. Returns the number of records written.
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Thu Aug 18 18:22:16 2011 | http://epydoc.sourceforge.net |