tecio.TecplotReader#

class tecio.TecplotReader(path)#

Bases: ABC

Shared interface for all Tecplot file readers (SZL, PLT, DAT).

Concrete subclasses (TecplotSzlReader, …) differ in how a file is opened and parsed, SZL keeps a live C file handle and queries it on demand, PLT and DAT parse eagerly and hold no handle, but expose an identical interface once open, so code (including the ParaView plugin) can be written against this base without caring which format produced a given file.

Attributes

auxdata

Dataset-level auxiliary data.

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.

abstract property auxdata#

Dataset-level auxiliary data.

close()[source]#

Release any open resources. No-op unless overridden.

SZL overrides this to close its C file handle; PLT and DAT hold no handle between accesses and use this default.

abstract property file_type#

FULL, GRID, or SOLUTION.

get_var_auxdata(var_index)[source]#

Return auxiliary data for variable var_index.

Raises:

IndexError – If var_index is out of range.

get_zone_auxdata(zone_index)[source]#

Return auxiliary data for zone zone_index.

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.

abstract property path#

Source file path.

abstract property title#

Dataset title string.

property var_auxdata#

Per-variable auxiliary data, 0-based.

Derived from get_var_auxdata(), a subclass never implements this separately.

abstract property variables#

Ordered list of variable name strings.

abstract property zones#

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