Module escpos.config

ESC/POS configuration manager.

This module contains the implementations of abstract base class Config.

class escpos.config.Config[source]

Bases: object

Configuration handler class.

This class loads configuration from a default or specified directory. It can create your defined printer and return it to you.


Load and parse the configuration file using pyyaml.


config_path – An optional file path, file handle, or byte string for the configuration file.


Return a printer that was defined in the config.

Throw an exception on error.

This method loads the default config if one has not been already loaded.