neuralmonkey.config.parsing module¶
Module responsible for INI parsing.
-
class
neuralmonkey.config.parsing.
VarsDict
¶ Bases:
collections.OrderedDict
,typing.Dict
-
neuralmonkey.config.parsing.
get_first_match
(pattern: Pattern[~AnyStr], string: str) → str¶ Return the first matching substring.
Parameters: - pattern – The pattern to find.
- string – The string to search.
Returns: The first occurence of the pattern in the string.
Raises: ValueError if the string does not match the pattern.
-
neuralmonkey.config.parsing.
parse_file
(config_file: Iterable[str], changes: Iterable[str] = None) → Tuple[Dict[str, Any], Dict[str, Any]]¶ Parse an INI file and creates all values.
-
neuralmonkey.config.parsing.
write_file
(config_dict: Dict[str, Any], config_file: IO[str]) → None¶