qgis_deployment_toolbelt.utils.ini_interpolation module¶
Custom INI files interpolation.
Author: Julien Moura (https://github.com/guts)
- class qgis_deployment_toolbelt.utils.ini_interpolation.EnvironmentVariablesInterpolation¶
Bases:
BasicInterpolation
Custom interpolation to handle environment variables in ini files.
Inspired from https://gist.github.com/malexer/ee2f93b1973120925e8beb3f36b184b8.
Example
[test] user = $USER user_home = $HOME fake_value_from_environment_variable = $QDT_TEST_ENV_VARIABLE pictures = %(user_home)s/.cache/qgis-deployment-toolbelt
- before_get(parser: ConfigParser, section: str, option: str, value: str, defaults: ChainMap) str ¶
Called for every get option=value line in INI file.
- before_set(parser: ConfigParser, section: str, option: str, value: str) str ¶
Called for every set option=value line in INI file.