showerpipe.lhe.source_adapter(source: Path | str | bytes) Iterator[BufferedIOBase][source]

Context manager to provide a consistent adapter interface for LHE data stored in various formats.

Parameters:
source : Pathlike, string, or bytes

The variable or filepath containing the LHE data. May be a path, url, string, or bytes object. Gzip compression is allowed.

Returns:

lhe_file – File-like object containing the Les Houches data. If source is a URL pointing to a non-gzipped file, lhe_file will not be seekable.

Return type:

io.BufferedIOBase


Last update: Jun 27, 2025