tecio.TecplotPltReader#

class tecio.TecplotPltReader(file_name)#

Bases: TecplotReader

Reader for Tecplot .plt binary files.

Zone metadata is parsed eagerly at construction (_PltParser reads the whole header section up front); variable data and node maps are read lazily from disk. Holds no open file handle between accesses, close() is a no-op (inherited from the base class default).

Parameters:

file_name – Path to the .plt file.

Raises:

PltReadError – If the file cannot be parsed as a valid PLT binary.

Attributes

auxdata

Dataset-level auxiliary data.

file_type

File type (FULL, GRID, or SOLUTION).

num_auxdata_items

Number of dataset-level auxiliary data items.

num_vars

Number of variables in the dataset.

num_zones

Number of zones in the file.

path

Source file path.

title

Dataset title string.

var_auxdata

Per-variable auxiliary data, 0-based.

variables

Ordered list of variable name strings.

zones

Zones in this file, by 0-based index or slice.

Methods

close()

Release any open resources.

get_var_auxdata(var_index)

Return auxiliary data for variable var_index.

get_zone_auxdata(zone_index)

Return auxiliary data for zone zone_index.

property auxdata#

Dataset-level auxiliary data.

property file_type#

File type (FULL, GRID, or SOLUTION).

property num_vars#

Number of variables in the dataset.

property num_zones#

Number of zones in the file.

Queried directly from the already-parsed metadata list. Cheaper than the base class’s default of len(self.zones), which would build every zone’s reader object first.

property path#

Source file path.

property title#

Dataset title string.

property variables#

Ordered list of variable name strings.

property zones#

Zones in this file, by 0-based index or slice.