;ò
ÎÑAHc           @   s   d  Z  d k l Z d e i d Z e i Z d k Z d k Z d k	 l	 Z	 d k l
 Z
 d k l Z d k Td	 e i f d
 „  ƒ  YZ d f  d „  ƒ  YZ d S(   sM   Configuration loader

$Id: ConfigLoader.py 1005 2006-01-12 08:39:26Z fperez $(   s   Releases   %s <%s>s   FernandoN(   s   pprint(   s   ultraTB(   s   Struct(   s   *s   ConfigLoaderErrorc           B   s   t  Z d  Z e d „ Z RS(   s!   Exception for ConfigLoader class.c         C   s   | |  _  d  S(   N(   s   argss   self(   s   selfs   args(    (    sD   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/ConfigLoader.pys   __init__   s    (   s   __name__s
   __module__s   __doc__s   Nones   __init__(    (    (    sD   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/ConfigLoader.pys   ConfigLoaderError   s    s   ConfigLoaderc           B   s>   t  Z d  Z e e d d „ Z d d „ Z e d d d „ Z RS(   s‰   Configuration file loader capable of handling recursive inclusions and
    with parametrized conflict resolution for multiply found keys.i   c         C   s#   | |  _  | |  _ |  i | ƒ d S(   s3  The reclimit parameter controls the number of recursive
        configuration file inclusions. This way we can stop early on (before
        python's own recursion limit is hit) if there is a circular
        inclusion.

        - conflict: dictionary for conflict resolutions (see Struct.merge())

        N(   s   conflicts   selfs	   field_seps   resets   reclimit(   s   selfs   conflicts	   field_seps   reclimit(    (    sD   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/ConfigLoader.pys   __init__$   s    	 		c         C   s   | |  _  d |  _ g  |  _ d  S(   Ni    (   s   reclimits   selfs   recdepths   included(   s   selfs   reclimit(    (    sD   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/ConfigLoader.pys   reset2   s    		s    s   .c         K   s  |  i |  i j o t d d |  i d ‚ n |  i d 7_ t | | ƒ } t ƒ  }
 | |  i	 j o |
 Sn t
 i ƒ  } | t j o | o h  t | <} n |
 i t | | d |  i d d d d d	 d | ƒ |  i	 i | ƒ | |
 i ƒ  j ox|
 | D]	} d }	 y t | | ƒ } Wnr t j
 of t i d
 d g j oC y | d 7} t | | ƒ } Wn t j
 o d }	 q“Xd }	 qžd }	 n Xd }	 |	 oT y, |
 i |  i | | | | |  |  i ƒ Wq| ƒ  t d | d ƒ qXqt d | | f ƒ qWn |
 Sd S(   sU  Load a configuration file, return the resulting Struct.

        Call: load_config(fname,convert=None,conflict=None,recurse_key='')

         - fname: file to load from.
         - convert: dictionary of type conversions (see read_dict())
         - recurse_key: keyword in dictionary to trigger recursive file
         inclusions.
         s'   maximum recursive inclusion of rcfiles s
   exceeded: s0   .
Maybe you have a circular chain of inclusions?i   s   fss   strips   warni    s   no_emptys   nts   doss   .inis   Problem loading included file: s   . Ignoring it...s#   File `%s` not found. Included by %sN(    s   selfs   recdepths   reclimits   ConfigLoaderErrors   filefinds   fnames   incpaths   Structs   datas   includeds   ultraTBs   AutoFormattedTBs   Xinfos   converts   Nones   recurse_keys   qwflats   merges	   read_dicts	   field_seps   kws   appends   keyss   incfilenames   founds   incfiles   IOErrors   oss   names   loads   conflicts   warn(   s   selfs   fnames   converts   recurse_keys   incpaths   kws   incfilenames   Xinfos   incfiles   founds   data(    (    sD   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/ConfigLoader.pys   load7   sP    	 	  

	(   s   __name__s
   __module__s   __doc__s   Nones   __init__s   resets   load(    (    (    sD   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/ConfigLoader.pys   ConfigLoader   s    (   s   __doc__s   IPythons   Releases   authorss
   __author__s   licenses   __license__s
   exceptionss   oss   pprints   ultraTBs   IPython.ipstructs   Structs   IPython.genutilss	   Exceptions   ConfigLoaderErrors   ConfigLoader(
   s   Structs   __license__s   pprints
   __author__s
   exceptionss   ConfigLoaders   Releases   ultraTBs   oss   ConfigLoaderError(    (    sD   /nyx/web/d/b/dbachman/work/src/ipython-0.8.4/IPython/ConfigLoader.pys   ?   s   				