Utilities to create and set the config.
The main class exported by this module is
ManimConfig. This class
contains all configuration options, including frame geometry (e.g. frame
height/width, frame rate), output (e.g. directories, logging), styling
(e.g. background color, transparency), and general behavior (e.g. writing a
movie vs writing a single frame).
See Configuration for an introduction to Manim’s configuration system.
The paths where
.cfgfiles will be searched for.
When manim is first imported, it processes any
.cfgfiles it finds. This function returns the locations in which these files are searched for. In ascending order of precedence, these are: the library-wide config file, the user-wide config file, and the folder-wide config file.
The library-wide config file determines manim’s default behavior. The user-wide config file is stored in the user’s home folder, and determines the behavior of manim whenever the user invokes it from anywhere in the system. The folder-wide config file only affects scenes that are in the same folder. The latter two files are optional.
These files, if they exist, are meant to loaded into a single
configparser.ConfigParserobject, and then processed by
List of paths which may contain
.cfgfiles, in ascending order of precedence.
- Return type
The location of the user-wide config file is OS-specific.
ConfigParserobject and load any
The user-wide file, if it exists, overrides the library-wide file. The folder-wide file, if it exists, overrides the other two.
The folder-wide file can be ignored by passing
custom_file. However, the user-wide and library-wide config files cannot be ignored.
custom_file (str | os.PathLike | None) – Path to a custom config file. If used, the folder-wide file in the relevant directory will be ignored, if it exists. If None, the folder-wide file will be used, if it exists.
A parser containing the config options found in the .cfg files that were found. It is guaranteed to contain at least the config options found in the library-wide file.
- Return type