Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
Load system wide base configuration.

:param config_file: the file name of the mapproxy.yaml configuration.
                    if ``None``, load the internal proxylib/default.yaml conf
:param clear_existing: if ``True`` remove the existing configuration settings,
                       else overwrite the settings.

        def load_base_config(config_file=None, clear_existing=False):
    """
    Load system wide base configuration.

    :param config_file: the file name of the mapproxy.yaml configuration.
                        if ``None``, load the internal proxylib/default.yaml conf
    :param clear_existing: if ``True`` remove the existing configuration settings,
                           else overwrite the settings.
    """

    if config_file is None:
        from mapproxy.config import defaults
        config_dict = {}
        for k, v in defaults.__dict__.iteritems():
            if k.startswith('_'): continue
            config_dict[k] = v
        conf_base_dir = os.getcwd()
        load_config(base_config(), config_dict=config_dict, clear_existing=clear_existing)
    else:
        conf_base_dir = os.path.abspath(os.path.dirname(config_file))
        load_config(base_config(), config_file=config_file, clear_existing=clear_existing)

    bc = base_config()
    finish_base_config(bc)

    bc.conf_base_dir = conf_base_dir
        


src/m/a/MapProxy-1.6.0/mapproxy/config/__init__.py   MapProxy(Download)
# limitations under the License.
 
from mapproxy.config.config import (
    base_config, abspath, load_base_config, load_default_config,
    finish_base_config, Options, local_base_config,

src/m/a/mapproxy-HEAD/mapproxy/config/__init__.py   mapproxy(Download)
# limitations under the License.
 
from mapproxy.config.config import (
    base_config, abspath, load_base_config, load_default_config,
    finish_base_config, Options, local_base_config,