Scalar values (strings) in repoze.configuration directives can include interpolation markers. Interpolation markers are in the Python interpolation form %(replaceme)s. Interpolation expands values by attempting to resolve the name being replaced by treating the configuration context as a dictionary full of potential replacement terms.

If thecontext does not possess the name, a few built-in names are tried:


The directory in which the configuration file lives.

For example, the value %(here)s will be interpolated as necessary in the following repoze.configuration config file:

--- !mydirective
filename: %(here)s/etc/named.conf

If the filename of the above configuration file was “/etc/mydirectives.yml”, the value that %(here)s would be expanded to would be /etc.

Previous topic

Built-In Directives

Next topic

Import-Level API

This Page