a `8a²ã@sHddlZddlmZddlmZdZGdd„deƒZGd d „d eƒZdS) éNé)Ú Configurationé)ÚSource)Ú ModuleSourceÚ ObjectSourcecs&eZdZ‡fdd„Zddd„Z‡ZS)rcsPtt|ƒ ¡t|tjƒr"||_n*t|tƒrDt|t ƒt ƒgdƒ|_nt dƒ‚dS)Néÿÿÿÿz3target must be a Module or a String naming a Module) ÚsuperrÚ__init__Ú isinstanceÚtypesÚ ModuleTypeÚtargetÚ basestringÚ __import__ÚglobalsÚlocalsÚ TypeError)Úselfr©Ú __class__©úN/home/carl/code/landscape/setoptconf-tmp/build/lib/setoptconf/source/modobj.pyr s   zModuleSource.__init__NcCs4|D]"}t|j|jƒrt|j|jƒ|_qt||d�S©N)ÚsettingsÚparent©ÚhasattrrÚnameÚgetattrÚvaluer©rrÚmanagerrÚsettingrrrÚ get_configszModuleSource.get_config)NN©Ú__name__Ú __module__Ú __qualname__r r$Ú __classcell__rrrrr s rcs&eZdZ‡fdd„Zddd„Z‡ZS)rcsŠtt|ƒ ¡t|ttfƒr$||_nbt|tƒr~| dd¡}t |ƒdkrZ|d}|dg}n |d}g}t |t ƒt ƒ|dƒ|_nt dƒ‚dS)NÚ.rrrrz5target must be an Object or a String naming an Object)r rr r ÚtypeÚobjectrrÚrsplitÚlenrrrr)rrÚpartsÚmodÚfromlistrrrr s    zObjectSource.__init__NcCs4|D]"}t|j|jƒrt|j|jƒ|_qt||d�Srrr!rrrr$/szObjectSource.get_config)NNr%rrrrrs r)r ÚconfigrÚbaserÚ__all__rrrrrrÚs