Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Loads the application configuration from a file.
Returns the configuration or None if no configuration could be found.

        def to_envvar(path=None):
    """
    Loads the application configuration from a file.
    Returns the configuration or None if no configuration could be found.
    """

    if path:
        path = os.path.abspath(path)
        if not os.path.exists(path):
            return
    elif os.path.exists(PRO_CONF_PATH):
        path = PRO_CONF_PATH
    else:
        return True

    os.environ['SKYLINES_CONFIG'] = path
    return True
        


src/s/k/skylines-HEAD/skylines/commands/__init__.py   skylines(Download)
 
from skylines.app import create_app
from config import to_envvar
 
 
def _create_app(config):
    if not to_envvar(config):

src/s/k/skylines-HEAD/uwsgi/mapproxy_uwsgi.py   skylines(Download)
#import thread
import argparse
from config import to_envvar
 
parser = argparse.ArgumentParser(description='Run the MapProxy WSGI app.')
args = parser.parse_args()
 
if not to_envvar(args.config_file):
    parser.error('Config file "{}" not found.'.format(args.config_file))