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

All Samples(71)  |  Call(60)  |  Derive(0)  |  Import(11)
Set the global configuration object.

Legacy sources of common configuration values are updated to
reflect the new configuration; this may be removed in some future
version.

        def setConfiguration(cfg):
    """Set the global configuration object.

    Legacy sources of common configuration values are updated to
    reflect the new configuration; this may be removed in some future
    version.
    """
    global _config
    _config = cfg

    if cfg is None:
        return

    from App import FindHomes
    import __builtin__
    import os
    import Globals  # to set data

    __builtin__.CLIENT_HOME = FindHomes.CLIENT_HOME = cfg.clienthome
    os.environ["CLIENT_HOME"] = cfg.clienthome
    # Globals does not export CLIENT_HOME
    Globals.data_dir = cfg.clienthome

    __builtin__.INSTANCE_HOME = FindHomes.INSTANCE_HOME = cfg.instancehome
    os.environ["INSTANCE_HOME"] = cfg.instancehome
    Globals.INSTANCE_HOME = cfg.instancehome

    if hasattr(cfg, 'softwarehome') and cfg.softwarehome is not None:
        __builtin__.SOFTWARE_HOME = FindHomes.SOFTWARE_HOME = cfg.softwarehome
        os.environ["SOFTWARE_HOME"] = cfg.softwarehome
        Globals.SOFTWARE_HOME = cfg.softwarehome

    if hasattr(cfg, 'zopehome') and cfg.zopehome is not None:
        __builtin__.ZOPE_HOME = FindHomes.ZOPE_HOME = cfg.zopehome
        os.environ["ZOPE_HOME"] = cfg.zopehome
        Globals.ZOPE_HOME = cfg.zopehome

    Globals.DevelopmentMode = cfg.debug_mode
        


src/z/o/Zope2-2.13.22/src/Zope2/Startup/run.py   Zope2(Download)
    handlers.handleConfig(opts.configroot, opts.confighandlers)
    import App.config
    App.config.setConfiguration(opts.configroot)
    return opts
 
def make_wsgi_app(global_config, zope_conf):
    from App.config import setConfiguration
    opts.realize(args=(), progname='Zope2WSGI', raise_getopt_errs=False)
    handleConfig(opts.configroot, opts.confighandlers)
    setConfiguration(opts.configroot)
    starter.setConfiguration(opts.configroot)
    starter.prepare()

src/z/o/Zope-HEAD/src/Zope2/Startup/run.py   Zope(Download)
    handlers.handleConfig(opts.configroot, opts.confighandlers)
    import App.config
    App.config.setConfiguration(opts.configroot)
    return opts
 
def make_wsgi_app(global_config, zope_conf):
    from App.config import setConfiguration
    opts.realize(args=(), progname='Zope2WSGI', raise_getopt_errs=False)
    handleConfig(opts.configroot, opts.confighandlers)
    setConfiguration(opts.configroot)
    starter.setConfiguration(opts.configroot)
    starter.prepare()

src/p/l/plone.app.robotframework-0.9.2/src/plone/app/robotframework/server.py   plone.app.robotframework(Download)
        config = App.config.getConfiguration()
        config.debug_mode = HAS_DEBUG_MODE
        App.config.setConfiguration(config)
 
    if 'Darwin' in platform.uname():
                config = App.config.getConfiguration()
                config.debug_mode = HAS_DEBUG_MODE
                App.config.setConfiguration(config)
        setup_layers[layer] = 1
 

src/i/n/infrae.wsgi-2.2.1/src/infrae/wsgi/paster.py   infrae.wsgi(Download)
        not opts.configroot.skip_authentication_checking,
        opts.configroot.verbose_security)
    App.config.setConfiguration(opts.configroot)
    set_zope_debug_mode(debug_mode)
 

src/z/o/Zope2-2.13.22/src/Zope2/utilities/finder.py   Zope2(Download)
        opts.realize(args=[], doc="", raise_getopt_errs=0)
        handlers.handleConfig(opts.configroot, opts.confighandlers)
        App.config.setConfiguration(opts.configroot)
        app = Zope2.app()
        return app

src/z/o/Zope-HEAD/src/Zope2/utilities/finder.py   Zope(Download)
        opts.realize(args=[], doc="", raise_getopt_errs=0)
        handlers.handleConfig(opts.configroot, opts.confighandlers)
        App.config.setConfiguration(opts.configroot)
        app = Zope2.app()
        return app

src/i/s/isotoma.recipe.zope2instance-0.0.6/isotoma/recipe/zope2instance/ctl.py   isotoma.recipe.zope2instance(Download)
    # We need to apply the configuration in one more place
    import App.config
    App.config.setConfiguration(options.configroot)
 
    # The PYTHONPATH is not set, so all commands starting a new shell fail
    # We need to apply the configuration in one more place
    import App.config
    App.config.setConfiguration(options.configroot)
 
    # The PYTHONPATH is not set, so all commands starting a new shell fail

src/c/o/collective.recipe.zope2wsgi-0.1/collective/recipe/zope2wsgi/utilities/ZODBTools/zodbload.py   collective.recipe.zope2wsgi(Download)
    opts.realize(args=[])
    h.handleConfig(opts.configroot, opts.confighandlers)
    config.setConfiguration(opts.configroot)
    from Zope.Startup import dropPrivileges
    dropPrivileges(opts.configroot)

src/r/e/repoze.zope2-1.0.3/repoze/zope2/scripts/finder.py   repoze.zope2(Download)
        opts.realize(args=[], doc="", raise_getopt_errs=0)
        handlers.handleConfig(opts.configroot, opts.confighandlers)
        App.config.setConfiguration(opts.configroot)
        app = Zope2.app()
        return app

src/r/e/repoze.zope2-1.0.3/repoze/zope2/db.py   repoze.zope2(Download)
    opts.realize(args=[], doc="", raise_getopt_errs=0)
    Zope2.Startup.handlers.handleConfig(opts.configroot, opts.confighandlers)
    App.config.setConfiguration(opts.configroot)
    starter.setConfiguration(opts.configroot)
    starter.setupInitialLogging()

  1 | 2 | 3 | 4  Next