OpenQuizz
Une application de gestion des contenus pédagogiques
BaseConfigurator Class Reference
Inheritance diagram for BaseConfigurator:
Collaboration diagram for BaseConfigurator:

Public Member Functions

def __init__ (self, config)
 
def resolve (self, s)
 
def ext_convert (self, value)
 
def cfg_convert (self, value)
 
def convert (self, value)
 
def configure_custom (self, config)
 
def as_tuple (self, value)
 

Data Fields

 config
 

Static Public Attributes

 CONVERT_PATTERN
 
 WORD_PATTERN
 
 DOT_PATTERN
 
 INDEX_PATTERN
 
 DIGIT_PATTERN
 
 value_converters
 
 importer
 

Detailed Description

The configurator base class which defines some useful defaults.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  config 
)

Member Function Documentation

◆ as_tuple()

def as_tuple (   self,
  value 
)
Utility function which converts lists to tuples.

◆ cfg_convert()

def cfg_convert (   self,
  value 
)
Default converter for the cfg:// protocol.

◆ configure_custom()

def configure_custom (   self,
  config 
)
Configure an object with a user-supplied factory.

Reimplemented in Configurator.

◆ convert()

def convert (   self,
  value 
)
Convert values to an appropriate type. dicts, lists and tuples are
replaced by their converting alternatives. Strings are checked to
see if they have a conversion format and are converted if they do.

◆ ext_convert()

def ext_convert (   self,
  value 
)
Default converter for the ext:// protocol.

◆ resolve()

def resolve (   self,
  s 
)
Resolve strings to objects using standard import and attribute
syntax.

Field Documentation

◆ config

config

◆ CONVERT_PATTERN

CONVERT_PATTERN
static

◆ DIGIT_PATTERN

DIGIT_PATTERN
static

◆ DOT_PATTERN

DOT_PATTERN
static

◆ importer

importer
static

◆ INDEX_PATTERN

INDEX_PATTERN
static

◆ value_converters

value_converters
static

◆ WORD_PATTERN

WORD_PATTERN
static

The documentation for this class was generated from the following file: