ConfigManager
- class ConfigManager
Helper class to handle vpype’s TOML configuration files.
This class is typically used via its singleton instance
config_manager:>>> from vpype import config_manager >>> my_config = config_manager.config.get("my_config", None)
Helper methods are provided for specific aspects of configuration, such as command-specific configs or HPGL-related configs.
By default, built-in configuration packaged with vpype are loaded at startup. If a file exists at path
~/.vpype.toml, it will be loaded as well. Additionaly files may be loaded using theload_config_file()method.Methods
Returns the configuration for command
name.Returns a
PlotterConfiginstance for plotterdevice.Returns a list of plotter names whose configuration is available.
Load a config file and add its content to the configuration database.
Attributes
Methods
- ConfigManager.get_command_config(name)
Returns the configuration for command
name.
- ConfigManager.get_plotter_config(device)
Returns a
PlotterConfiginstance for plotterdevice.If
Noneis passed, this function attempts to use the default device if one is configured, or the function returns None.- Parameters
device (
Optional[str]) -- name of desired plotter (orNoneto use the default device if configured)- Return type
- Returns
PlotterConfiginstance or None if not found
- ConfigManager.get_plotter_list()
Returns a list of plotter names whose configuration is available.