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 742 of file read_grid.py.
def flextest.flexread.read_grid.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 773 of file read_grid.py.
def flextest.flexread.read_grid.BinaryFile.close | ( | self | ) |
Definition at line 904 of file read_grid.py.
def flextest.flexread.read_grid.BinaryFile.flush | ( | self | ) |
Definition at line 899 of file read_grid.py.
def flextest.flexread.read_grid.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 796 of file read_grid.py.
def flextest.flexread.read_grid.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 879 of file read_grid.py.
def flextest.flexread.read_grid.BinaryFile.tell | ( | self | ) |
Definition at line 894 of file read_grid.py.
def flextest.flexread.read_grid.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 866 of file read_grid.py.
flextest.flexread.read_grid.BinaryFile.file |
Definition at line 786 of file read_grid.py.
flextest.flexread.read_grid.BinaryFile.mode |
Definition at line 785 of file read_grid.py.
flextest.flexread.read_grid.BinaryFile.order |
Definition at line 790 of file read_grid.py.
|
static |
Definition at line 768 of file read_grid.py.