changeset 88:dd8ad435cb26

STUB: pyloader/factory.py
author Jeff Hammel <k0scist@gmail.com>
date Fri, 21 Mar 2014 22:35:56 -0700
parents 29ca60f428cc
children 7fdd934855bf
files pyloader/factory.py
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pyloader/factory.py	Fri Mar 21 22:27:51 2014 -0700
+++ b/pyloader/factory.py	Fri Mar 21 22:35:56 2014 -0700
@@ -41,7 +41,7 @@
 
     def load(self, name=None):
         """load an object"""
-        
+
         name = name or self.main # load main section by default
         assert name in self.config, "'%s' not found in configuration"
         if name in self.parsed:
@@ -92,9 +92,11 @@
             if value in self.config:
                 return self.load(value)
         return value
-                                                            
+
 class IniFactory(PyFactory):
-    """load a python object from an .ini file"""
+    """
+    load a python object from an .ini file
+    """
 
     def __init__(self, inifile, main=''):
         assert os.path.exists(inifile), "File not found: %s" % inifile
@@ -105,6 +107,7 @@
     @classmethod
     def configuration(cls, iniconfig, **defaults):
         """interpret configuration from raw .ini syntax"""
+
         config = {}
         interpolated = set()
         seen = set()
@@ -131,7 +134,7 @@
             # interpret decorators
             if ':' in path:
                 wrapper, _path = path.split(':', 1)
-                # TODO: could interpolate wrapper 
+                # TODO: could interpolate wrapper
                 if wrapper in names:
 
                     # inline wrapper arguments:
@@ -156,7 +159,7 @@
 
                     # get wrapper options
                     if wrapper not in config:
-                        # load wrapper configuration 
+                        # load wrapper configuration
                         wrapper_section = names[wrapper]
                         if wrapper_section in seen:
                             pass # TODO