tecio.TecplotSzlReader#
- class tecio.TecplotSzlReader(file_name)#
Bases:
TecplotReaderReader for Tecplot
.szpltfiles.Keeps a live C file handle for the reader’s lifetime. Zones are constructed, and their scalar metadata resolved, on first access to
zone, not at open time, so opening a file with many zones stays cheap if the caller only wants dataset-level information.- Parameters:
file_name – Path to the
.szpltfile.- Raises:
FileNotFoundError – If file_name does not exist.
Attributes
Dataset-level auxiliary data.
File type enum (FULL, GRID, or SOLUTION).
num_auxdata_itemsNumber of dataset-level auxiliary data items.
Number of variables in the dataset.
Number of zones in the file.
Source file path.
Dataset title string.
var_auxdataPer-variable auxiliary data, 0-based.
Ordered list of variable name strings.
Zones in this file, by 0-based index or slice.
Methods
close()Close the file reader handle.
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 enum (FULL, GRID, or SOLUTION).
- property num_vars#
Number of variables in the dataset.
Queried directly. Cheaper than the base class’s default of
len(self.variables), which would needzonebuilt first.
- property num_zones#
Number of zones in the file.
Queried directly. Cheaper than the base class’s default of
len(self.zones), which would build every zone’s metadata.
- property path#
Source file path.
- property title#
Dataset title string.
- property variables#
Ordered list of variable name strings.
Variable names are dataset-global in SZL, so this queries them directly rather than through any zone’s variable list.
- property zones#
Zones in this file, by 0-based index or slice.