pyiron_base.utils.parser.extract_data_from_file#
- pyiron_base.utils.parser.extract_data_from_file(file_name: str, tag: str, num_args: int = 1) List[str | List[str]][source]#
General purpose routine to extract any static from a log (text) file
- Parameters:
file_name (str) – file name or path to the file, can either be absolute or relative
tag (str) – string at the beginning of the line
num_args (int) – number of arguments separated by ‘ ‘ or ‘,’ to extract after the tag
- Returns:
List of arguments extracted as strings
- Return type:
List[Union[str, List[str]]]