manim._config

Set the global config and logger.

Functions

tempconfig(temp)[source]

Context manager that temporarily modifies the global config object.

Inside the with statement, the modified config will be used. After context manager exits, the config will be restored to its original state.

Parameters

temp (Union[ManimConfig, dict]) – Object whose keys will be used to temporarily update the global config.

Return type

contextlib._GeneratorContextManager

Examples

Use with tempconfig({...}) to temporarily change the default values of certain config options.

>>> config['frame_height']
8.0
>>> with tempconfig({'frame_height': 100.0}):
...     print(config['frame_height'])
100.0
>>> config['frame_height']
8.0