tecio.szl.Read#

class tecio.szl.Read#

Bases: object

Reader for Tecplot .szplt files.

Metadata is queried lazily from the C library. Variable data arrays are read on first access via ReadVariable.values.

Parameters:

file_name – Path to the .szplt file.

__enter__()[source]#

Context manager for Read class.

__exit__(exc_type, exc_value, traceback)[source]#

Exit Read class context manager regardless of exceptions.

Only raise an exception if closing the file fails, not if an exception is raised in the with block.

__init__(file_name)[source]#

Initialize with a C-pointer file handle, metadata, and a list of zones.

__repr__()[source]#

Set a nice repr string for the read object.

property auxdata#

Per-variable auxiliary data (1-indexed to match Tecplot).

close()[source]#

Close the file reader handle.

property file_type#

File type enum (FULL, GRID, or SOLUTION).

get_var_auxdata(var_index)[source]#

Get list of variable-level auxiliary data.

Returns:

List of AuxData objects, one per variable (1-indexed to match Tecplot)

Raises:

IndexError – If var_index is out of range.

get_zone_auxdata(zone_index)[source]#

Return auxiliary data for zone zone_index (1-based).

Raises:

IndexError – If zone_index is out of range.

property num_auxdata_items#

Number of dataset-level auxiliary data items.

property num_vars#

Number of variables in the dataset.

property num_zones#

Number of zones in the file.

property title#

Dataset title string.

property var_auxdata#

Per-variable auxiliary data (1-indexed to match Tecplot).

property variables#

Ordered list of variable name strings.