import sys
import afs.util.options
from afs.util.options import define, options

class AfsConfig(object):
    """
    Representation of config
    """
    ## Path to configuration file
    CONF_FILE = "./afspy.cfg"
    ## Flag if database cache should be used
    DB_CACHE = False
    
    def __init__(self,opt=None):
        if opt:
            self.load()
    
    def load(self):
        define("DB_CACHE",  default="False", help="")
        define("CONF_FILE", default=self.CONF_FILE, help="")

        try :
            afs.util.options.parse_config_file(self.CONF_FILE) 
        except afs.util.options.Error :
            print "Error: " , sys.exc_info()[1]
            sys.exit()
        except:
            return       
        
        self.DB_CACHE = eval(options.DB_CACHE)


@@ -135,16 +135,131 @@
 f config
+.%0A    To use a custom config, instantiate this w/o parameters, set CONF_FILE to your%0A    Path and then call load().
 %0A    %22%22%22

add comments in AfsConfig.py how to use it