HELPER FUNCTIONS ##########. More...
Public Member Functions | |
def | __init__ |
def | read |
def | write |
def | seek |
def | tell |
def | flush |
def | close |
Public Attributes | |
mode | |
file | |
order | |
Static Public Attributes | |
dictionary | structtypes |
HELPER FUNCTIONS ##########.
BinaryFile: A class for accessing data to/from large binary files The data is meant to be read/write sequentially from/to a binary file. One can request to read a piece of data with a specific type and shape from it. Also, it supports the notion of Fortran and C ordered data, so that the returned data is always well-behaved (C-contiguous and aligned). This class is seeking capable. :Author: Francesc Alted :Contact: faltet@pytables.org :Created: 2010-03-18 :Acknowledgment: Funding for the development of this code is provided through the Norwegian Research Council VAUUAV project #184724, 2010
Definition at line 569 of file read_header.py.
def flextest.flexread.read_header.BinaryFile.__init__ | ( | self, | |
filename, | |||
mode = "r" , |
|||
order = "fortran" |
|||
) |
Open the `filename` for write/read binary files. The `mode` can be 'r', 'w' or 'a' for reading (default), writing or appending. The file will be created if it doesn't exist when opened for writing or appending; it will be truncated when opened for writing. Add a '+' to the mode to allow simultaneous reading and writing. `order` specifies whether the file is is written in 'fortran' or 'c' order.
Definition at line 600 of file read_header.py.
def flextest.flexread.read_header.BinaryFile.close | ( | self | ) |
Definition at line 728 of file read_header.py.
def flextest.flexread.read_header.BinaryFile.flush | ( | self | ) |
Definition at line 723 of file read_header.py.
def flextest.flexread.read_header.BinaryFile.read | ( | self, | |
dtype, | |||
shape = (1, |
|||
) |
Read an array of `dtype` and `shape` from current position. `shape` must be any tuple made of integers or even () for scalars. The current position will be updated to point to the end of read data.
Definition at line 621 of file read_header.py.
def flextest.flexread.read_header.BinaryFile.seek | ( | self, | |
offset, | |||
whence = 0 |
|||
) |
Move to new file position. Argument offset is a byte count. Optional argument whence defaults to 0 (offset from start of file, offset should be >= 0); other values are 1 (move relative to current position, positive or negative), and 2 (move relative to end of file, usually negative, although many platforms allow seeking beyond the end of a file). If the file is opened in text mode, only offsets returned by tell() are legal. Use of other offsets causes undefined behavior.
Definition at line 703 of file read_header.py.
def flextest.flexread.read_header.BinaryFile.tell | ( | self | ) |
Definition at line 718 of file read_header.py.
def flextest.flexread.read_header.BinaryFile.write | ( | self, | |
arr | |||
) |
Write an `arr` to current position. The current position will be updated to point to the end of written data.
Definition at line 690 of file read_header.py.
flextest.flexread.read_header.BinaryFile.file |
Definition at line 613 of file read_header.py.
flextest.flexread.read_header.BinaryFile.mode |
Definition at line 612 of file read_header.py.
flextest.flexread.read_header.BinaryFile.order |
Definition at line 617 of file read_header.py.
|
static |
Definition at line 595 of file read_header.py.