# HG changeset patch # User Jeff Hammel # Date 1306548043 25200 # Node ID edecb6fbd5a791a81df5c8f663e54ee117ca3ef2 # Parent 0bea5297c15692131d917daba6ad029cbaa8cbd1 further stubbing of ini factory diff -r 0bea5297c156 -r edecb6fbd5a7 pyloader/factory.py --- a/pyloader/factory.py Fri May 27 18:56:00 2011 -0700 +++ b/pyloader/factory.py Fri May 27 19:00:43 2011 -0700 @@ -4,6 +4,7 @@ import loader import os +from ConfigParser import SafeConfigParser as ConfigParser __all__ = ['CircularReferenceError', 'PyFactory', 'IniFactory'] @@ -88,3 +89,13 @@ def read(self): """reads configuration from an .ini file""" + + here = os.path.dirname(os.path.abspath(self.inifile)) + + # read configuration + defaults={'here': here, + 'this': os.path.abspath(self.inifile)} + parser = ConfigParser(defaults=defaults) + parser.optionxform = str # use whole case + parser.read(self.inifile) +