biopython v1.71.0 Bio.File.UndoHandle

A Python handle that adds functionality for saving lines.

Saves lines in a LIFO fashion.

Added methods:

  • saveline Save a line to be returned next time.
  • peekline Peek at the next line without consuming it.

Link to this section Summary

Functions

Call special method when opening the file using a with-statement

Call special method when closing the file using a with-statement

Return File attribute

Initialize the class

Iterate over the lines in the File

Return the next line

Python 2 style alias for Python 3 style next method

Return the next line in the file, but do not move forward though the file

Read the File

Read the next line from the file as string

Read all the lines from the file as a list of strings

Store a line in the cache memory for later use

Set the current position at the offset specified

Return the current position of the file read/write pointer within the File

Link to this section Functions

Call special method when opening the file using a with-statement.

Call special method when closing the file using a with-statement.

Return File attribute.

Initialize the class.

Iterate over the lines in the File.

Return the next line.

Python 2 style alias for Python 3 style next method.

Return the next line in the file, but do not move forward though the file.

Read the File.

Read the next line from the file as string.

Read all the lines from the file as a list of strings.

Store a line in the cache memory for later use.

This acts to undo a readline, reflecting the name of the class: UndoHandle.

Set the current position at the offset specified.

Return the current position of the file read/write pointer within the File.