pyiron_base.utils.parser.extract_data_from_str_lst

pyiron_base.utils.parser.extract_data_from_str_lst#

pyiron_base.utils.parser.extract_data_from_str_lst(str_lst: List[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:
  • str_lst (List[str]) – list of strings representing the lines in the file

  • 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]]]