ó žµäKc@sÖdZddlZddlmZmZmZmZmZmZm Z m Z ddlm Z m Z m Z mZddlZdefd„ƒYZdefd„ƒYZd efd „ƒYZd efd „ƒYZdS( s(Compatibility interfaces for ConfigParser Interfaces of ConfigParser, RawConfigParser and SafeConfigParser should be completely identical to the Python standard library versions. Tested with the unit tests included with Python-2.3.4 The underlying INIConfig object can be accessed as cfg.data iÿÿÿÿN(tDuplicateSectionErrortNoSectionErrort NoOptionErrortInterpolationMissingOptionErrortInterpolationDepthErrortInterpolationSyntaxErrort DEFAULTSECTtMAX_INTERPOLATION_DEPTH(tErrortInterpolationErrortMissingSectionHeaderErrort ParsingErrortRawConfigParsercBsýeZded„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z dd„Z dd „Z d „Zd „Zd „Zied 6ed6ed6ed6ed6ed6ed6ed6Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs:|tkrtdƒ‚ntjd|d|ƒ|_dS(NsCustom dict types not supportedtdefaultstoptionxformsource(tdictt ValueErrortinit INIConfigtdata(tselfR t dict_type((s3/usr/lib/python2.7/site-packages/iniparse/compat.pyt__init__s cCs |jƒS(N(tlower(Rt optionstr((s3/usr/lib/python2.7/site-packages/iniparse/compat.pyt optionxform#scCs=i}|jj}x$|jD]}|j|ƒ||' is used. N(RR-(RR2R1((s3/usr/lib/python2.7/site-packages/iniparse/compat.pytreadfpgscCs||j|ƒst|ƒ‚n|dk rC||krC||}n|j|}||kri|j|ƒSt||ƒ‚dS(N(R#RtNoneRRR(RR%toptiontvarstvaluetsec((s3/usr/lib/python2.7/site-packages/iniparse/compat.pytgetqs    cCs`||jkrPg}x4|j|D]%}|j||j||ƒfƒq#W|St|ƒ‚dS(N(RR,R:R(RR%tanstopt((s3/usr/lib/python2.7/site-packages/iniparse/compat.pytitems}s #cCst|j||ƒƒS(N(tintR:(RR%R6((s3/usr/lib/python2.7/site-packages/iniparse/compat.pytgetint†scCst|j||ƒƒS(N(tfloatR:(RR%R6((s3/usr/lib/python2.7/site-packages/iniparse/compat.pytgetfloat‰st1tyesttruetont0tnotfalsetoffcCsH|j||ƒ}|jƒ|jkr7td|‚n|j|jƒS(NsNot a boolean: %s(R:Rt_boolean_statesR(RR%R6tv((s3/usr/lib/python2.7/site-packages/iniparse/compat.pyt getbooleanscCs5||jkr|j|}n t|ƒ‚||kS(s=Check for the existence of a given option in a given section.(RR(RR%R6R9((s3/usr/lib/python2.7/site-packages/iniparse/compat.pyt has_option•s cCs3||jkr#||j|| s : " ŸN