File#
- class biotite.File[source]#
Bases:
CopyableBase class for all file classes. The constructor creates an empty file, that can be filled with data using the class specific setter methods. Conversely, the class method
read()reads a file from disk (or a file-like object from other sources). In order to write the instance content into a file thewrite()method is used.- copy() Self#
Create a deep copy of this object.
- Returns:
- copy
A copy of this object.
- abstractmethod classmethod read(file: str | PathLike[str] | IO[Any]) Self#
Parse a file (or file-like object).
- Parameters:
- filefile-like object or str
The file to be read. Alternatively a file path can be supplied.
- Returns:
- fileFile
An instance from the respective
Filesubclass representing the parsed file.