Table of Contents

Class: Configurator | Twisted-0.17.4/twisted/coil/coil.py
--- | ---

### A configurator object implementing default behaviour.

Custom handling of configuration-item-setting can be had by adding configure_%s(self, value) methods to my subclass. The default is to set an attribute on the instance that will be configured.

A method getConfiguration should return a mapping of attribute to value, for attributes mentioned in configTypes. The default is to get the attribute from the instance that is being configured.

Methods |
--- | ---
__init__ configDispensers configure getConfiguration getInstance getType
| __init__

    __init__ ( self,  instance )

Initialize this configurator with the instance it will be configuring.

Exceptions |
--- | ---
TypeError, "%s is not a %s" %( instance, self.configurableClass )

| configDispensers

    configDispensers ( self )

Return list of dispensers.

| configure

    configure ( self,  dict )

Set a list of configuration variables.

Exceptions |
--- | ---
InvalidConfiguration( "non-boolean for boolean type" ) InvalidConfiguration( "type mismatch" ) InvalidConfiguration("Configuration item '%s' has " "unknown type '%s'" %( name, t ) )

| getConfiguration

    getConfiguration ( self )

### Return a mapping of key/value tuples describing my configuration.

By default gets the attributes from the instance being configured, override in subclasses if necessary.

| getInstance

    getInstance ( self )

Return the instance being configured.

| getType

    getType ( self,  name )

Get the type of a configuration variable.

Table of Contents

This document was automatically generated on Sat Apr 20 01:32:16 2002 by HappyDoc version 2.0