Table of Contents

Module: config_components ./src/peak/config/config_components.py
Imported modules   
from __future__ import generators
from interfaces import *
import os.path
from peak.api import *
from peak.binding.components import Component, Make, getParentComponent, iterParents, Configurable, Require, Delegate
from peak.binding.interfaces import IAttachable, IRecipe
from peak.model.enumerations import enum, Enumeration
from peak.naming.interfaces import IStreamFactory, IAddress, IState
from peak.util.EigenData import EigenCell, AlreadyRead
from peak.util.FileParsing import AbstractConfigParser
from peak.util.imports import importString, importObject, whenImported
from protocols.advice import getMRO, determineMetaclass
from registries import FactoryFor
Functions   
Value
_setCellInDict
fileNearModule
getStreamFactory
getStreamFactory_alreadyFactory
getStreamFactory_fromAddress
getStreamFactory_fromString
iterKeys
iterValues
lookup
packageFile
parentProviding
parentsProviding
processXML
  Value 
Value ( v )

Return an IRule that always returns v

  _setCellInDict 
_setCellInDict (
        d,
        key,
        value,
        )

  fileNearModule 
fileNearModule ( moduleName,  filename )

DEPRECATED: please switch to config.packageFile() or a URL

  getStreamFactory 
getStreamFactory ( context,  source )

Return a naming.IStreamFactory for source

Usage:

        factory = config.getStreamFactory(context,source)

If source is a naming.IStreamFactory, it is simply returned. If it is a string or Unicode object, it will be interpreted as either a filename or URL. If it is a URL, it will be looked up in context. If it is a filename, a file-based stream factory will be returned. (This is so that the configuration system can use filenames without the naming system configuration being bootstrapped yet.)

This is a generic function, and you may define additional cases for it using its when() method; e.g.:

        [config.getStreamFactory.when(MyType)]
        def getStreamFactory(context,source):
            '''Return a stream factory for 'source' (a 'MyType' instance)'''

  getStreamFactory_alreadyFactory 
getStreamFactory_alreadyFactory ( context,  source )

  getStreamFactory_fromAddress 
getStreamFactory_fromAddress ( context,  source )

  getStreamFactory_fromString 
getStreamFactory_fromString ( context,  source )

  iterKeys 
iterKeys ( component,  configKey )

Iterate sub-keys of configKey that are available from component

  iterValues 
iterValues ( component,  configKey )

Return iterator over all values of'configKey' for component

  lookup 
lookup (
        component,
        configKey,
        default=NOT_GIVEN,
        )

Return value for configKey in context of component, or default

Exceptions   
exceptions.NameNotFound( configKey, resolvedObj = component )
  packageFile 
packageFile ( moduleName,  filename )

Return naming.IStreamFactory for filename in moduleName package

  parentProviding 
parentProviding (
        component,
        protocol,
        default=NOT_GIVEN,
        )

Return first parent providing protocol for component, or default

Exceptions   
exceptions.NameNotFound( protocol, resolvedObj = component )
  parentsProviding 
parentsProviding ( component,  protocol )

Iterate over all parents of component that adapt to protocol

  processXML 
processXML (
        context,
        source,
        **kw,
        )

Return the result of parsing source using context to control parsing

This is basically a shortcut for XMLParser(context,**kw).parse(source). See config.XMLParser for full documentation. Also note that this function will only return a value if the parser has a finish function defined. See the parse method of XMLParser for more details.

Classes   

ConfigMap

ConfigurationRoot

Default implementation for a configuration root.

CreateViaFactory

IRule' for one-time creation of target interface using FactoryFor()

IniLoader

Component that lazily loads its configuration from .ini file(s)

LazyRule

Namespace

Traverse to another property namespace

NamingStateAsSmartProperty

ServiceArea

Component that acts as a home for "global"-ish services

XMLKey

XMLKey(kind,xmlns,name)
key to look up XML elements and attributes

XMLKind

Allowed kinds for XMLKey instances

XMLParser

Wrap a SOX.NegotiatingParser for configuration-driven XML parsing

__NamespaceExtensions


Table of Contents

This document was automatically generated on Mon Apr 15 01:11:04 2024 by HappyDoc version 2.1