bw_simapro_csv.main
Attributes
Classes
Read a SimaPro CSV file object, and parse the contents. |
Functions
|
Module Contents
- class bw_simapro_csv.main.SimaProCSV(path_or_stream: pathlib.Path | io.StringIO, encoding: str = 'sloppy-windows-1252', database_name: str | None = None, stderr_logs: bool = True, write_logs: bool = True, copy_logs: bool = False)[source]
Read a SimaPro CSV file object, and parse the contents.
We start with the header, as this defines how the rest of the file is to be parsed. It gives the CSV delimiter and decimal separator.
We then break the file into logical chunks, such as processes or LCIA impact categories.
- copy_log_dir(base_dir: pathlib.Path) None[source]
Copy the logs directory and its files to base_dir
- get_next_block(rewindable_csv_reader: bw_simapro_csv.csv_reader.BeKindRewind, header: dict) bw_simapro_csv.blocks.SimaProCSVBlock | None[source]
- bw_simapro_csv.main.INDETERMINATE_SECTION_ERROR = Multiline-String[source]
Show Value
""" Flow lists are given at the end of this file, but the section headings for flow lists are also used in inventory process descriptions. We can normally use the text 'End' to show when a process block stops, but this file doesn't seem to use 'End' sections. We therefore can't tell if '{}' is a new block or not, and can't parse this file. """