Back to index

plone3  3.1.7
Functions | Variables
ATContentTypes.configuration.config Namespace Reference

Functions

def loadConfig

Variables

string __author__ = 'Christian Heimes <tiran@cheimes.de>'
string __docformat__ = 'restructuredtext'
tuple INSTANCE_ETC = os.path.join(INSTANCE_HOME, 'etc')
tuple _here = os.path.dirname(__file__)
tuple ATCT_HOME = os.path.dirname(os.path.abspath(os.path.join(_here)))
tuple ATCT_ETC = os.path.join(ATCT_HOME, 'etc')
string CONFIG_NAME = 'atcontenttypes.conf'
tuple INSTANCE_CONFIG = os.path.join(INSTANCE_ETC, CONFIG_NAME)
tuple ATCT_CONFIG = os.path.join(ATCT_ETC, CONFIG_NAME)
tuple ATCT_CONFIG_IN = os.path.join(ATCT_ETC, CONFIG_NAME+'.in')
tuple FILES = (INSTANCE_CONFIG, ATCT_CONFIG, ATCT_CONFIG_IN,)
tuple __all__ = ('zconf', 'handler', 'conf_file')

Function Documentation

def ATContentTypes.configuration.config.loadConfig (   files,
  schema = atctSchema,
  overwrite = False 
)
Config loader

The config loader tries to load the first existing file

Definition at line 55 of file config.py.

00055 
00056 def loadConfig(files, schema=atctSchema, overwrite=False):
00057     """Config loader
00058     
00059     The config loader tries to load the first existing file
00060     """
00061     global zconf, handler, conf_file
00062     if not isinstance(files, (tuple, list)):
00063         files = (files, )
00064     if zconf is not None and not overwrite:
00065         raise RuntimeError, 'Configuration is already loaded'
00066     for file in files:
00067         if file is not None:
00068             if not os.path.exists(file):
00069                 raise RuntimeError, '%s does not exist' % file
00070             conf_file = file
00071             zconf, handler = ConfigLoader(schema).loadURL(conf_file)
00072             break
00073 
00074 
00075 loadConfig(FILES)


Variable Documentation

tuple ATContentTypes.configuration.config.__all__ = ('zconf', 'handler', 'conf_file')

Definition at line 76 of file config.py.

string ATContentTypes.configuration.config.__author__ = 'Christian Heimes <tiran@cheimes.de>'

Definition at line 22 of file config.py.

Definition at line 23 of file config.py.

tuple ATContentTypes.configuration.config._here = os.path.dirname(__file__)

Definition at line 33 of file config.py.

Definition at line 40 of file config.py.

Definition at line 41 of file config.py.

Definition at line 35 of file config.py.

tuple ATContentTypes.configuration.config.ATCT_HOME = os.path.dirname(os.path.abspath(os.path.join(_here)))

Definition at line 34 of file config.py.

string ATContentTypes.configuration.config.CONFIG_NAME = 'atcontenttypes.conf'

Definition at line 38 of file config.py.

Definition at line 51 of file config.py.

Definition at line 39 of file config.py.

tuple ATContentTypes.configuration.config.INSTANCE_ETC = os.path.join(INSTANCE_HOME, 'etc')

Definition at line 32 of file config.py.