Ë »q0®ææ>OãóÊ—ddlZddlZddlZddlmZmZmZmZddlZddl m Z da edededediZ d d d d d d d d d d d d d d d d œZ eeeeedœZd„ZdZdZdZdZdZdZe«ZdZdZdZdZdddddddddddddœ Zd„ZGd„de«ZGd „d!e«Z e «Z!d"„Z"Gd#„d$e#«Z$Gd%„d&e$«Z%Gd'„d(e$«Z&Gd)„d*e'«Z(Gd+„d,e$«Z)Gd-„d.e$«Z*Gd/„d0e$«Z+Gd1„d2e+«Z,Gd3„d4e$«Z-Gd5„d6e+«Z.Gd7„d8e$«Z/Gd9„d:e«Z0Gd;„de0«Z2e1e2d?œZ3d@„Z4GdA„dBe5«Z6GdC„dDe6«Z7GdE„dFe«Z8dIdG„Z9dJdH„Z:y)KéN)ÚBOM_UTF8Ú BOM_UTF16Ú BOM_UTF16_BEÚ BOM_UTF16_LEé)Ú __version__)Úutf_8N)Úutf16_beÚutf_16)Úutf16_ler )r r r r r r )r Úu16Úutf16zutf-16r Ú utf_16_bezutf-16ber Ú utf_16_lezutf-16ler Úu8ÚutfÚutf8úutf-8)r r r r NcóN—tj|j««dk(S)Nr )ÚBOM_LISTÚgetÚlower)Úencodings ú7/usr/lib/python3.12/site-packages/configobj/__init__.pyÚ match_utf8rDs€Ü �<‰<˜Ÿ™Ó(Ó )¨WÑ 4Ð4óz'%s'z"%s"z%sz '"z"""%s"""z'''%s''')ÚDEFAULT_INDENT_TYPEÚDEFAULT_INTERPOLATIONÚConfigObjErrorÚ NestingErrorÚ ParseErrorÚDuplicateErrorÚConfigspecErrorÚ ConfigObjÚ SimpleValÚInterpolationErrorÚInterpolationLoopErrorÚMissingInterpolationOptionÚRepeatSectionErrorÚ ReloadErrorÚ UnreprErrorÚ UnknownTypeÚflatten_errorsÚget_extra_valuesÚ configparserz é TF) Ú interpolationÚ raise_errorsÚ list_valuesÚ create_emptyÚ file_errorÚ configspecÚ stringifyÚ indent_typerÚdefault_encodingÚunreprÚwrite_empty_valuescó´—t€ddlad|z}tj|«}|j«dj«dj«dS)Nrza=r)ÚcompilerÚparseÚ getChildren)ÚsÚps rÚgetObjrB€sO€äÐÛØ ˆq‰€AÜ�‰�qÓ€AØ �=‰=‹?˜1Ñ × )Ñ )Ó +¨AÑ .× :Ñ :Ó <¸QÑ ?Ð?rcó —eZdZy)r,N)Ú__name__Ú __module__Ú __qualname__©rrr,r,‰s„Ørr,cóH—eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z y ) ÚBuildercób—t€t|jj«‚t|«S©N)Úmr,Ú __class__rD©ÚselfÚos rÚbuildz Builder.build�s%€Ü ˆ9ܘaŸk™k×2Ñ2Ó3Ð 3Ü�‹tˆ rcó\—tt|j|j«««SrK)ÚlistÚmaprQr?rNs rÚ build_ListzBuilder.build_List”s€Ü”C˜Ÿ ™  A§M¡M£OÓ4Ó5Ð5rcó—|jSrK)ÚvaluerNs rÚ build_ConstzBuilder.build_Const—s €Ø�w‰wˆrcóŽ—i}tt|j|j«««}|D]}t |«||<Œ|SrK)ÚiterrTrQr?Únext)rOrPÚdÚiÚels rÚ build_DictzBuilder.build_Dictšs>€Ø ˆÜ ”�T—Z‘Z §¡£Ó1Ó 2ˆÛˆBܘ“GˆAˆbŠEðàˆrcó6—t|j|««SrK)ÚtuplerUrNs rÚ build_TuplezBuilder.build_Tuple¡s€Ü�T—_‘_ QÓ'Ó(Ð(rcóx—|jdk(ry|jdk(ry|jdk(rytd«‚)NÚNoneÚTrueTÚFalseFzUndefined Name)Únamer,rNs rÚ build_NamezBuilder.build_Name¤s=€Ø �6‰6�VÒ ØØ �6‰6�VÒ ØØ �6‰6�WÒ ØôÐ*Ó+Ð+rcó—tt|j|j«««\}} t |«}t|t«r|jdk7r t d«‚||zS#t $r t d«‚wxYw)NÚAddg) rSrTrXr?ÚfloatÚ TypeErrorr,Ú isinstanceÚcomplexÚreal)rOrProÚimags rÚ build_AddzBuilder.build_Add¯sy€Üœ#˜d×.Ñ.°· ± ³Ó@ÓA‰ ˆˆdð %ܘ“;ˆDô˜$¤Ô(¨D¯I©I¸Ò,<ܘeÓ$Ð $Ø�D‰yÐøô ò %ܘeÓ$Ð $ð %ús ² A,Á,Bcód—|j|j«}t||j«SrK)rQÚexprÚgetattrÚattrname)rOrPÚparents rÚ build_GetattrzBuilder.build_Getattr¹s%€Ø—‘˜AŸF™FÓ#ˆÜ�v˜qŸz™zÓ*Ð*rcóH—|j|j«d« S©Nr©rXr?rNs rÚbuild_UnarySubzBuilder.build_UnarySub½s!€Ø× Ñ  §¡£°Ñ!3Ó4Ð4Ð4rcóF—|j|j«d«SryrzrNs rÚbuild_UnaryAddzBuilder.build_UnaryAddÀs€Ø×Ñ § ¡ £°Ñ 2Ó3Ð3rN) rDrErFrQrUrXr_rbrhrqrwr{r}rGrrrIrI�s4„òò 6òòò)ò ,òò+ò5ó4rrIcó4—|s|Sddl}|j|«Sry)ÚastÚ literal_eval)r@rs rr:r:Çs €Ù ؈óØ × Ñ ˜AÓ Ðrcó—eZdZdZdd„Zy)rzk This is the base class for all errors that ConfigObj raises. It is a subclass of SyntaxError. NcóL—||_||_tj||«yrK)ÚlineÚ line_numberÚ SyntaxErrorÚ__init__)rOÚmessager„rƒs rr†zConfigObjError.__init__Õs!€ØˆŒ Ø&ˆÔÜ×јT 7Õ+r)ÚNrˆ©rDrErFÚ__doc__r†rGrrrrÐs „ñô,rrcó—eZdZdZy)r zE This error indicates a level of nesting that doesn't match. N©rDrErFrŠrGrrr r Ûó„òrr có—eZdZdZy)r!z‘ This error indicates that a line is badly written. It is neither a valid ``key = value`` line, nor a valid section marker line. NrŒrGrrr!r!ás„òrr!có—eZdZdZd„Zy)r*zW A 'reload' operation failed. This exception is a subclass of ``IOError``. có0—tj|d«y)Nz#reload failed, filename is not set.)ÚIOErrorr†©rOs rr†zReloadError.__init__îs€Ü×јÐDÕErNr‰rGrrr*r*és „ñóFrr*có—eZdZdZy)r"z: The keyword or section specified already exists. NrŒrGrrr"r"òr�rr"có—eZdZdZy)r#z7 An error occured whilst parsing a configspec. NrŒrGrrr#r#ør�rr#có—eZdZdZy)r&z,Base class for the two interpolation errors.NrŒrGrrr&r&þs„Ú6rr&có—eZdZdZd„Zy)r'z=Maximum interpolation depth exceeded in string interpolation.có6—tj|d|z«y)Nz*interpolation loop detected in value "%s".©r&r†)rOÚoptions rr†zInterpolationLoopError.__init__s€Ü×#Ñ#Ø Ø 8¸6Ñ Aõ CrNr‰rGrrr'r's „ÙGóCrr'có—eZdZdZy)r)zk This error indicates additional sections in a section with a ``__many__`` (repeated) section. NrŒrGrrr)r) s„òrr)có—eZdZdZd„Zy)r(z0A value specified for interpolation was missing.có:—d|z}tj||«y)Nz%missing option "%s" in interpolation.r˜)rOr™Úmsgs rr†z#MissingInterpolationOption.__init__s€Ø5¸Ñ>ˆÜ×#Ñ# D¨#Õ.rNr‰rGrrr(r(s „Ù:ó/rr(có—eZdZdZy)r+z An error parsing in unrepr mode.NrŒrGrrr+r+s„Ú*rr+cóP—eZdZdZej d«ZdZd„Zd„Z d„Z d„Z y) ÚInterpolationEnginez– A helper class to help perform string interpolation. This class is an abstract base class; its descendants perform the actual work. ú %\(([^)]*)\)sÚ%có—||_yrK©Úsection)rOr¥s rr†zInterpolationEngine.__init__*s €àˆ� rcó`‡‡—‰j|vr|Sˆˆfd„Љ||‰ji«}|S)Ncó¶•—||jf|vr t|«‚d|||jf<‰ jj|«}|r‰ j |«\}}}|€|}n ‰ ||||«}|j «\} } dj |d| ||| df«}| t|«z} ‰ jj|| «}|rŒ|||jf=|S)axThe function that does the actual work. ``value``: the string we're trying to interpolate. ``section``: the section in which that string was found ``backtrail``: a dict to keep track of where we've been, to detect and prevent infinite recursion loops This is similar to a depth-first-search algorithm. rNrˆ)rgr'Ú_KEYCREÚsearchÚ _parse_matchÚspanÚjoinÚlen)ÚkeyrWr¥Ú backtrailÚmatchÚkÚvr@Ú replacementÚstartÚendÚnew_search_startÚrecursive_interpolaterOs €€rr·z>InterpolationEngine.interpolate..recursive_interpolate4s÷ø€ð�W—\‘\Ð" iÑ/ä,¨SÓ1Ð1à-.ˆI�s˜GŸL™LÐ)Ñ *ð—L‘L×'Ñ'¨Ó.ˆEÙð×+Ñ+¨EÓ2‘��1�aØ�9à"#‘Kñ#8¸¸1¸aÀÓ"K�Kà"ŸZ™Z›\‘ ��sØŸ™  v¨ ° ¸UÀ3À4¸[Ð IÓJ�Ø#(¬3¨{Ó+;Ñ#;Р🠙 ×+Ñ+¨EÐ3CÓD�ò!ð&˜3 § ¡ Ð-Ð.àˆLr)Ú_cookier¥)rOr®rWr·s` @rÚ interpolatezInterpolationEngine.interpolate/s5ù€à�|‰|˜uÑ$؈Lõ( ñX& c¨5°$·,±,ÀÓCˆØˆ rcóÒ—|jjj}d|jj_|j} |j|«}|�t |t «snP|jdi«j|«}|�t |t «sn|j |urn |j }Œt||jj_|€ t|«‚||fS)zˆHelper function to fetch values from owning section. Returns a 2-tuple: the value, and the section where it was found. FÚDEFAULT)r¥Úmainr1rrmÚSectionrvr()rOr®Ú save_interpÚcurrent_sectionÚvals rÚ_fetchzInterpolationEngine._fetchdsÚ€ð —l‘l×'Ñ'×5Ñ5ˆ Ø*/ˆ� ‰ ×ÑÔ'ðŸ,™,ˆØà!×%Ñ% cÓ*ˆC؈¤z°#´wÔ'?Øà!×%Ñ% i°Ó4×8Ñ8¸Ó=ˆC؈¤z°#´wÔ'?Øð×%Ñ%¨Ñ8àØ-×4Ñ4ˆOðð"+6ˆ� ‰ ×ÑÔ'Ø ˆ;Ü,¨SÓ1Ð 1Ø�OÐ#Ð#rcó—t«‚)aÁImplementation-dependent helper function. Will be passed a match object corresponding to the interpolation key we just found (e.g., "%(foo)s" or "$foo"). Should look up that key in the appropriate config file section (using the ``_fetch()`` helper function) and return a 3-tuple: (key, value, section) ``key`` is the name of the key we're looking for ``value`` is the value found for that key ``section`` is a reference to the section where it was found ``key`` and ``section`` should be None if no further interpolation should be performed on the resulting value (e.g., if we interpolated "$$" and returned "$"). )ÚNotImplementedError)rOr°s rrªz InterpolationEngine._parse_match†s €ô "Ó#Ð#rN) rDrErFrŠÚreÚcompiler¨r¸r†r¹rÁrªrGrrr r s5„ñðˆb�j‰jÐ)Ó*€GØ€Gòò 2òj$óD$rr có>—eZdZdZdZej d«Zd„Zy)ÚConfigParserInterpolationzBehaves like ConfigParser.r¢r¡cóV—|jd«}|j|«\}}|||fS)Nr)ÚgrouprÁ©rOr°r®rWr¥s rrªz&ConfigParserInterpolation._parse_matchŸs.€Ø�k‰k˜!‹nˆØŸ™ SÓ)‰ˆˆwØ�E˜7Ð"Ð"rN) rDrErFrŠr¸rÄrÅr¨rªrGrrrÇrÇšs „Ù$Ø€G؈b�j‰jÐ)Ó*€Gó#rrÇcór—eZdZdZdZdZejdejejz«Z d„Z y)ÚTemplateInterpolationzBehaves like string.Template.Ú$zÐ \$(?: (?P\$) | # Two $ signs (?P[_a-z][_a-z0-9]*) | # $name format {(?P[^}]*)} # ${name} format ) cóæ—|jd«xs|jd«}|�|j|«\}}|||fS|jd«�d|jdfSd|j«dfS)NÚnamedÚbracedÚescaped)rÉrÁÚ _delimiterrÊs rrªz"TemplateInterpolation._parse_match²su€à�k‰k˜'Ó"Ò; e§k¡k°(Ó&;ˆØ ˆ?Ø!Ÿ[™[¨Ó-‰NˆE�7ؘ˜wÐ&Ð &à �;‰;�yÓ !Ð -à˜Ÿ™¨$Ð.Ð .à�U—[‘[“] DÐ(Ð(rN) rDrErFrŠr¸rÒrÄrÅÚ IGNORECASEÚVERBOSEr¨rªrGrrrÌr̦s;„Ù'Ø€GØ€J؈b�j‰jð ð �]‰]˜RŸZ™ZÑ 'ó )€Gó )rrÌ)r/Útemplatecó(—|j|g|¢­ŽSrK)Ú__new__)ÚclsÚargss rÚ __newobj__rÚÆs€à ˆ3�;‰;�sÐ "˜TÒ "Ð"rcóò—eZdZdZd„Zd„Zd#d„Zd„Zd„Zd„Z d$d „Z d „Z d%d „Z d „Z efd „Zd„Zd„Zd%d„Zd„Zd„Zd„Zd„Zd„ZeZd„Zd„ZeZde_d„Zd„Zd„Z d&d„Zd„Z d„Z!d„Z"d „Z#d!„Z$d"„Z%y)'r½a� A dictionary-like object that represents a section in a config file. It does string interpolation if the 'interpolation' attribute of the 'main' object is set to True. Interpolation is tried first from this object, then from the 'DEFAULT' section of this object, next from the parent and its 'DEFAULT' section, and so on until the main object is reached. A Section will behave like an ordered dictionary - following the order of the ``scalars`` and ``sections`` attributes. You can use this to change the order of members. Iteration follows the order: scalars, then sections. cór—tj||d«|jj|d«y)Nrr)ÚdictÚupdateÚ__dict__©rOÚstates rÚ __setstate__zSection.__setstate__Ýs*€Ü � ‰ �D˜% ™(Ô#Ø � ‰ ×јU 1™XÕ&rcóX—t|«|jf}t|jf|fSrK)rÝrßrÚrMràs rÚ __reduce__zSection.__reduce__ás(€Ü�d“˜TŸ]™]Ð+ˆÜ˜TŸ^™^Ð-¨uÐ5Ð5rNcóÈ—|€i}tj|«||_||_||_||_|j «|j«D] \}}|||<Œ y)zÇ * parent is the section above * depth is the depth level of this section * main is the main ConfigObj * indict is a dictionary to initialise the section with N)rÝr†rvr¼ÚdepthrgÚ _initialiseÚitems)rOrvrær¼ÚindictrgÚentryrWs rr†zSection.__init__æsa€ð ˆ>؈FÜ � ‰ �dÔàˆŒ àˆŒ àˆŒ àˆŒ à ×ÑÔð#ŸL™LžN‰LˆE�5؈D�ŠKñ+rcó‚—g|_g|_i|_i|_d|_g|_i|_g|_d|_y)NF) ÚscalarsÚsectionsÚcommentsÚinline_commentsr6ÚdefaultsÚdefault_valuesÚ extra_valuesÚ_createdr’s rrçzSection._initialisesD€àˆŒ àˆŒ àˆŒ Ø!ˆÔàˆŒàˆŒ Ø ˆÔØˆÔØˆ� rcó8— |j}|j||«S#t$rp|jj}|dk(rt}|j «}t j|d«}|€d|j_|cYS||«x}|_YŒŠwxYw)NTF) Ú_interpolation_engineÚAttributeErrorr¼r1rrÚinterpolation_enginesrr¹)rOr®rWÚenginergÚclass_s rÚ _interpolatezSection._interpolatesœ€ð Cà×/Ñ/ˆFð"×!Ñ! # uÓ-Ð-øô!ò Cà—9‘9×*Ñ*ˆDØ�tŠ|ä,�Ø—:‘:“<ˆDÜ*×.Ñ.¨t°TÓ:ˆF؈~à*/�— ‘ Ô'Ø’ ñ7=¸T³lÐB�˜Ö3ð Cús‚  A%BÂBÂBcó(‡‡—tj‰‰«}‰jjr^t |t j «r‰j‰|«St |t«r"ˆˆfd„}|D�cgc] }||«‘Œ }}||k7r|S|Scc}w)z+Fetch the item and do string interpolation.có`•—t|tj«r‰j‰|«S|SrK)rmÚsixÚ string_typesrú)rêr®rOs €€rÚ_checkz#Section.__getitem__.._check/s+ø€Ü! %¬×)9Ñ)9Ô:Ø#×0Ñ0°°eÓ<Ð<Ø �Lr) rÝÚ __getitem__r¼r1rmrýrþrúrS)rOr®rÀrÿrêÚnews`` rrzSection.__getitem__(s„ù€ä×јt SÓ)ˆØ �9‰9× "Ò "ܘ#œs×/Ñ/Ô0Ø×(Ñ(¨¨cÓ2Ð2ܘ#œtÔ$õ!ñ36Ó6±#¨‘v˜e•}°#�Ð6ؘ#’:Ø�J؈ ùò7sÁ5Bc óâ—t|tj«std|z«‚||jvrg|j|<d|j |<||j vr|j j|«t|t«r7||vr|jj|«tj|||«yt|t«r`|s^||vr|jj|«|jdz}tj||t|||j||¬««y||vr|jj|«|jj sot|tj«rnTt|t"t$f«r0|D]*}t|tj«rŒt'd|z«‚nt'd|z«‚tj|||«y)a³ Correctly set a value. Making dictionary values Section instances. (We have to special case 'Section' instances - which are also dicts) Keys must be strings. Values need only be strings (or lists of strings) if ``main.stringify`` is set. ``unrepr`` must be set when setting a value to a dictionary, without creating a new sub-section. zThe key "%s" is not a string.rˆr)rérgzValue is not a string "%s".N)rmrýrþÚ ValueErrorrîrïrðÚremover½ríÚappendrÝÚ __setitem__rær¼rìr7rSrarl)rOr®rWr:Ú new_depthrês rrzSection.__setitem__9s €ô˜#œs×/Ñ/Ô0ÜÐ<¸sÑBÓCÐ Cð �d—m‘mÑ #Ø!#ˆD�M‰M˜#Ñ Ø(*ˆD× Ñ  Ñ %à �$—-‘-Ñ Ø �M‰M× Ñ  Ô %ä �eœWÔ %ؘ$‰Ø— ‘ ×$Ñ$ SÔ)Ü × Ñ ˜T 3¨Õ .Ü ˜œtÔ $©Vð˜$‰Ø— ‘ ×$Ñ$ SÔ)ØŸ ™  Q™ˆIÜ × Ñ ØØÜØØØ—I‘IØ Øô õ ð˜$‰Ø— ‘ ×#Ñ# CÔ(Ø—9‘9×&Ò&ܘe¤S×%5Ñ%5Ô6ØÜ ¬¬e }Ô5Û!&˜Ü)¨%´×1AÑ1AÕBÜ"+Ð,IÈEÑ,QÓ"RÐRñ"'ô$Ð$AÀEÑ$IÓJÐJÜ × Ñ ˜T 3¨Õ .rcóî—tj||«||jvr|jj|«n|jj|«|j |=|j |=y)z-Remove items from the sequence when deleting.N)rÝÚ __delitem__rìrrírîrï©rOr®s rr zSection.__delitem__ts\€ä ×ј$ Ô$Ø �$—,‘,Ñ Ø �L‰L× Ñ  Õ $à �M‰M× Ñ  Ô %Ø �M‰M˜#Ð Ø × Ñ  Ñ %rcó0— ||S#t$r|cYSwxYw)z>A version of ``get`` that doesn't bypass string interpolation.©ÚKeyError©rOr®Údefaults rrz Section.gets%€ð ؘ‘9Ð øÜò ØŠNð ús ‚‡ ”có"—|D] }||||<Œ y)zD A version of update that uses our ``__setitem__``. NrG)rOrérês rrÞzSection.update‡s€óˆEØ  ™-ˆD�ŠKñrcóN— ||}||=|S#t$r|tur‚|}Y|SwxYw)z± 'D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised' )r ÚMISSING)rOr®rrÀs rÚpopz Section.pop�sF€ð  Ø�s‘)ˆCð �S� ؈ øô ò Øœ'Ñ!ØØ‰Cðˆ ð  ús ‚ Œ$£$cóp—|j|jz}|s td«‚|d}||}||=||fS)zPops the first (key,val)z": 'popitem(): dictionary is empty'r)rìrír )rOÚsequencer®rÀs rÚpopitemzSection.popitemŸsE€à—L‘L 4§=¡=Ñ0ˆÙÜÐ?Ó@Ð @Ø�q‰kˆØ�C‰yˆØ �ˆIØ�Cˆxˆrcó�—tj|«g|_g|_i|_i|_d|_g|_g|_y)zÔ A version of clear that also affects scalars/sections Also clears comments and configspec. Leaves other attributes alone : depth/main/parent are not affected N) rÝÚclearrìrírîrïr6rðròr’s rrz Section.clearªsC€ô � ‰ �4ÔØˆŒ ؈Œ ؈Œ Ø!ˆÔ؈ŒØˆŒ ؈Õrcó@— ||S#t$r |||<||cYSwxYw)z:A version of setdefault that sets sequence if appropriate.r rs rÚ setdefaultzSection.setdefault¼s3€ð ؘ‘9Ð øÜò ؈D�‰Iؘ‘9Ò ð ús ‚‡œc óˆ—tt|j|jzt|j ««««S)z8D.items() -> list of D's (key, value) pairs, as 2-tuples)rSÚziprìríÚvaluesr’s rrèz Section.itemsÅs,€ä”C˜Ÿ™¨¯ © Ñ5¼¸T¿[¹[»]Ó8KÓLÓMÐMrcó4—|j|jzS)zD.keys() -> list of D's keys©rìrír’s rÚkeysz Section.keysÊs€à— ‘ ˜tŸ}™}Ñ,Ð-rcó`—|j|jzD�cgc]}||‘Œ c}Scc}w)z D.values() -> list of D's valuesrr s rrzSection.valuesÏs-€à&*§l¡l°T·]±]Ò&BÓDÑ&B˜c��S“ Ð&BÑDÐDùÒDsœ +cóF—tt|j«««S)z=D.iteritems() -> an iterator over the (key, value) items of D)rZrSrèr’s rÚ iteritemszSection.iteritemsÔs€ä”D˜Ÿ™›Ó&Ó'Ð'rcóF—t|j|jz«S)z.D.iterkeys() -> an iterator over the keys of D)rZrìrír’s rÚiterkeyszSection.iterkeysÙs€ä�T—\‘\ D§M¡MÑ1Ó3Ð3rcóF—tt|j«««S)z2D.itervalues() -> an iterator over the values of D)rZrSrr’s rÚ itervalueszSection.itervaluesàs€ä”D˜Ÿ™›Ó'Ó(Ð(rc óć—ˆfd„}ddj‰j‰jzD�cgc]!}t|«›dt||««›�‘Œ#c}«zScc}w)zx.__repr__() <==> repr(x)cóZ•— ‰|S#t$rtj‰|«cYSwxYwrK©r(rÝr©r®rOs €rÚ_getvalz!Section.__repr__.._getvalçó4ø€ð 3ؘC‘yÐ øÜ-ò 3Ü×'Ñ'¨¨cÓ2Ò2ð 3úó ƒˆ*©*z{%s}ú, ú: ©r¬rìríÚrepr©rOr,r®s` rÚ__repr__zSection.__repr__åsaø€ô 3𠘟 ™ ØŸ ™  t§}¡}Ò4ó#7Ù4�ô15°Sµ ¼4ÁÈà Ô;MÒ$NØ4ñ#7ó8ñ8ð 8ùò#7ó®&A zx.__str__() <==> str(x)cóÜ—i}|D]d}||}t|t«r|j«}n7t|t«r t|«}nt|t«r t |«}|||<Œf|S)a0 Return a deepcopy of self as a dictionary. All members that are ``Section`` instances are recursively turned to ordinary dictionaries - by calling their ``dict`` method. >>> n = a.dict() >>> n == a 1 >>> n is a 0 )rmr½rÝrSra)rOÚnewdictrêÚ this_entrys rrÝz Section.dictõsj€ðˆÛˆEؘe™ˆJܘ*¤gÔ.Ø'Ÿ_™_Ó.‘ ܘJ¬Ô-ä! *Ó-‘ ܘJ¬Ô.ä" :Ó.� Ø'ˆG�EŠNððˆrcóÈ—t|j««D]F\}}||vr8t||t«r%t|t«r||j |«ŒB|||<ŒHy)aQ A recursive update - useful for merging config files. >>> a = '''[section1] ... option1 = True ... [[subsection]] ... more_options = False ... # end of file'''.splitlines() >>> b = '''# File is user.ini ... [section1] ... option1 = False ... # end of file'''.splitlines() >>> c1 = ConfigObj(b) >>> c2 = ConfigObj(a) >>> c2.merge(c1) >>> c2 ConfigObj({'section1': {'option1': 'False', 'subsection': {'more_options': 'False'}}}) N)rSrèrmrÝÚmerge)rOrér®rÀs rr:z Section.mergesT€ô&˜VŸ\™\›^Ö,‰HˆC�Ø�t‘ ¤ ¨4°©9´dÔ ;Ü *¨3´Ô 5Ø�S‘ —‘ Õ$à��S’ ñ -rcó—||jvr |j}n)||jvr |j}ntd|z«‚|j|«}||}tj ||«tj |||«|j|«|j||«|j|}|j|}|j|=|j|=||j|<||j|<y)a Change a keyname to another, without changing position in sequence. Implemented so that transformations can be made on keys, as well as on values. (used by encode and decode) Also renames comments. zKey "%s" not found.N) rìrír ÚindexrÝr rrÚinsertrîrï)rOÚoldkeyÚnewkeyÚthe_listÚposrÀÚcommÚinline_comments rÚrenamezSection.rename,sè€ð �T—\‘\Ñ !Ø—|‘|‰HØ �t—}‘}Ñ $Ø—}‘}‰HäÐ0°6Ñ9Ó:Ð :Ø�n‰n˜VÓ$ˆà�6‰lˆÜ ×ј˜vÔ&Ü ×ј˜v sÔ+Ø�‰˜ÔØ�‰˜˜VÔ$Ø�}‰}˜VÑ$ˆØ×-Ñ-¨fÑ5ˆØ �M‰M˜&Ð !Ø × Ñ  Ð (Ø $ˆ� ‰ �fÑØ'5ˆ×јVÒ$rc ó—i}tt|j««D]0}|j|} |||fi|¤Ž}|j|}|||<Œ2tt|j««D]I}|j|}|r |||fi|¤Ž|j|}||j |f||dœ|¤Ž||<ŒK|S#t$r|r‚|j|}d||<YŒÁwxYw#t$r|r‚|j|}d||<YŒwwxYw)a˜ Walk every member and call a function on the keyword and value. Return a dictionary of the return values If the function raises an exception, raise the errror unless ``raise_errors=False``, in which case set the return value to ``False``. Any unrecognised keyword arguments you pass to walk, will be pased on to the function you pass in. Note: if ``call_on_sections`` is ``True`` then - on encountering a subsection, *first* the function is called for the *whole* subsection, and then recurses into it's members. This means your function must be able to handle strings, dictionaries and lists. This allows you to change the key of subsections as well as for ordinary members. The return value when called on the whole subsection has to be discarded. See the encode and decode methods for examples, including functions. .. admonition:: caution You can use ``walk`` to transform the names of members of a section but you mustn't add or delete members. >>> config = '''[XXXXsection] ... XXXXkey = XXXXvalue'''.splitlines() >>> cfg = ConfigObj(config) >>> cfg ConfigObj({'XXXXsection': {'XXXXkey': 'XXXXvalue'}}) >>> def transform(section, key): ... val = section[key] ... newkey = key.replace('XXXX', 'CLIENT1') ... section.rename(key, newkey) ... if isinstance(val, (tuple, list, dict)): ... pass ... else: ... val = val.replace('XXXX', 'CLIENT1') ... section[newkey] = val >>> cfg.walk(transform, call_on_sections=True) {'CLIENT1section': {'CLIENT1key': None}} >>> cfg ConfigObj({'CLIENT1section': {'CLIENT1key': 'CLIENT1value'}}) F)r2Úcall_on_sections)Úranger­rìÚ ExceptionríÚwalk) rOÚfunctionr2rFÚkeywargsÚoutr]rêrÀs rrIz Section.walkJs=€ð^ˆä”s˜4Ÿ<™<Ó(Ö)ˆAØ—L‘L ‘OˆEð 'Ù˜t UÑ7¨hÑ7�àŸ ™  Q™�Ø ��E’ ð *ô”s˜4Ÿ=™=Ó)Ö*ˆAØ—M‘M !Ñ$ˆEÙð+Ù˜T 5Ñ5¨HÒ5🠙  aÑ(�à)˜˜e™×)Ñ)Øðà)Ø!1ñðñ ˆC�ŠJð+ð&ˆ øô5ò 'ÙØà ŸL™L¨™O�EØ!&�C˜“Jð  'ûô!ò+Ù#Øà $§ ¡ ¨aÑ 0˜Ø%*˜˜E› ð +ús#´C C&à C#Ã"C#Ã& D ÄD cóò—||}|dk(ry|dk(ry t|tj«s t«‚|jj |j «S#t$rtd|z«‚wxYw)a_ Accepts a key as input. The corresponding value must be a string or the objects (``True`` or 1) or (``False`` or 0). We allow 0 and 1 to retain compatibility with Python 2.2. If the string is one of ``True``, ``On``, ``Yes``, or ``1`` it returns ``True``. If the string is one of ``False``, ``Off``, ``No``, or ``0`` it returns ``False``. ``as_bool`` is not case sensitive. Any other input will raise a ``ValueError``. >>> a = ConfigObj() >>> a['a'] = 'fish' >>> a.as_bool('a') Traceback (most recent call last): ValueError: Value "fish" is neither True nor False >>> a['b'] = 'True' >>> a.as_bool('b') 1 >>> a['b'] = 'off' >>> a.as_bool('b') 0 TFz$Value "%s" is neither True nor False)rmrýrþr r¼Ú_boolsrr)rOr®rÀs rÚas_boolzSection.as_boolŸs|€ð8�3‰iˆØ �$Š;ØØ �EŠ\Øð OÜ! #¤s×'7Ñ'7Ô8ä"›*Ð$àŸ9™9×+Ñ+¨C¯I©I«KÑ8Ð8øÜò OÜ Ð!GÈ#Ñ!MÓNÐNð Oús “A AÁA6có—t||«S)ai A convenience method which coerces the specified value to an integer. If the value is an invalid literal for ``int``, a ``ValueError`` will be raised. >>> a = ConfigObj() >>> a['a'] = 'fish' >>> a.as_int('a') Traceback (most recent call last): ValueError: invalid literal for int() with base 10: 'fish' >>> a['b'] = '1' >>> a.as_int('b') 1 >>> a['b'] = '3.2' >>> a.as_int('b') Traceback (most recent call last): ValueError: invalid literal for int() with base 10: '3.2' )Úintr s rÚas_intzSection.as_intËs€ô(�4˜‘9‹~Ðrcó—t||«S)a> A convenience method which coerces the specified value to a float. If the value is an invalid literal for ``float``, a ``ValueError`` will be raised. >>> a = ConfigObj() >>> a['a'] = 'fish' >>> a.as_float('a') #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ValueError: invalid literal for float(): fish >>> a['b'] = '1' >>> a.as_float('b') 1.0 >>> a['b'] = '3.2' >>> a.as_float('b') #doctest: +ELLIPSIS 3.2... )rkr s rÚas_floatzSection.as_floatâs€ô&�T˜#‘YÓÐrcóT—||}t|ttf«r t|«S|gS)aU A convenience method which fetches the specified value, guaranteeing that it is a list. >>> a = ConfigObj() >>> a['a'] = 1 >>> a.as_list('a') [1] >>> a['a'] = (1,) >>> a.as_list('a') [1] >>> a['a'] = [1] >>> a.as_list('a') [1] )rmrarS)rOr®Úresults rÚas_listzSection.as_listøs,€ð �c‘ˆÜ �fœu¤d˜mÔ ,ܘ“<Р؈xˆrcó¤—|j|}tj|||«||jvr|jj |«|S)a Restore (and return) default value for the specified key. This method will only work for a ConfigObj that was created with a configspec and has been validated. If there is no default value for this key, ``KeyError`` is raised. )rñrÝrrðrrs rÚrestore_defaultzSection.restore_defaultsI€ð×%Ñ% cÑ*ˆÜ ×ј˜s GÔ,Ø �d—m‘mÑ #Ø �M‰M× Ñ  Ô %؈rcó�—|jD]}|j|«Œ|jD]}||j«Œy)a' Recursively restore default values to all members that have them. This method will only work for a ConfigObj that was created with a configspec and has been validated. It doesn't delete or modify entries without default values. N)rñrYríÚrestore_defaults)rOr®r¥s rr[zSection.restore_defaultssB€ð×&Ô&ˆCØ × Ñ  Õ %ð'ð—}”}ˆGØ �‰M× *Ñ *Õ ,ñ%r©NN©FrK)TF)&rDrErFrŠrârär†rçrúrrr rrÞrrrrrrèr rr#r%Ú__iter__r'r4Ú__str__rÝr:rDrIrOrRrTrWrYr[rGrrr½r½ÊsË„ñò$'ò6ó  ò4ò".ò.ó"8/òv&óò(ð 'ó ò òó$òNò .ò Eò (ò 4ð€Hò)ò 8ð€GØ/€G„Oò ò8 ò66ð<+/Ø"óRòj)OòXò. ò,ò, ó -rr½c ó¤—eZdZdZej dej «Zej dej «Zej dej «Z ej dej «Z ej dej «Z ej d«Z ej d«Z ej d «Zej d «Ze efe efd œZd d d d d d d d dœZ d+d„Zd„Zd,d„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd-d„Zd„Z d„Z!d „Z"d!„Z#d"„Z$d#„Z%d$„Z&d%„Z'd&„Z(d.d'„Z) d/d(„Z*d)„Z+d*„Z,y)0r$z2An object to read, create, and write config files.a“^ # line start (\s*) # indentation ( # keyword (?:".*?")| # double quotes (?:'.*?')| # single quotes (?:[^'"=].*?) # no quotes ) \s*=\s* # divider (.*) # value (including list values and comments) $ # line end a=^ (\s*) # 1: indentation ((?:\[\s*)+) # 2: section marker open ( # 3: section name open (?:"\s*\S.*?\s*")| # at least one non-space with double quotes (?:'\s*\S.*?\s*')| # at least one non-space with single quotes (?:[^'"\s].*?) # at least one non-space unquoted ) # section name close ((?:\s*\])+) # 4: section marker close \s*(\#.*)? # 5: optional comment $aÙ^ (?: (?: ( (?: (?: (?:".*?")| # double quotes (?:'.*?')| # single quotes (?:[^'",\#][^,\#]*?) # unquoted ) \s*,\s* # comma )* # match all list items ending in a comma (if any) ) ( (?:".*?")| # double quotes (?:'.*?')| # single quotes (?:[^'",\#\s][^,]*?)| # unquoted (?:(?ˆð ˆ?؉Gã Ø �M‰Mð?ä,¸ð ô <ó !�ؤÒ/Ü#Ð$?À%Ñ$GÓHÐHð!ô!%¤_×%:Ñ%:Ó%<Ö =‘ ��uØ Ñ'Ø%*�G˜E‘NØ (¨¡� ؘMÓ)Ø%2�G˜E’Nð !>ñ Ø%*ˆG�MÑ "à ×јÔ!ؘ\Ñ*ˆ Ø$.ˆÔ!Ø � ‰ �6˜:Õ&rcó’‡ —t|tj«rª||_tj j |«r+t|d«5}|j«xsg}ddd«�n|jrtd|jz«‚|jr&t|d«5}|jd«ddd«g}nµt|ttf«r t|«}n“t|t«rLt|t «rˆ fd„Š ‰ ||«n|D] }||||<Œ |`|�|j%|«yd|_yt)|dt*«t*ur|j-«xsg}n t/d«‚rD|j1|«}|D].}|r|dd vrŒ d D]}|j3|«sŒ||_nnt7d „|D««sJt9|««‚|D�cgc]}|j;d «‘Œ}}|j=|«|j"rnd |j"dj>z}tA|j"«dkDrd|z} tC| «} n|j"d} |j"| _"|| _#| ‚|`|€d|_y|j%|«y#1swY�Œ9xYw#1swY�ŒþxYwcc}w)NÚrbzConfig file not found: "%s".Úwrˆcó‚•—|jD] }||||<Œ |jD]}i||<‰||||«ŒyrKr)Ú in_sectionÚ this_sectionrêr¥Ú set_sections €rrz$ConfigObj._load..set_sectionêsPø€Ø!+×!3Ô!3˜Ø.8¸Ñ.?˜  UÒ+ð"4à#-×#6Ô#6˜Ø02˜  WÑ-Ù# J¨wÑ$7¸ÀgÑ9NÕOñ$7rÚreadz>infile must be a filename, file like object, or list of lines.éÿÿÿÿ)Ú Ú )ú rƒr‚c3óPK—|]}t|tj«–—Œ y­wrK)rmrýrþ)Ú.0rƒs rÚ z"ConfigObj._load..sèø€ÐJÁ'¸$”:˜d¤C×$4Ñ$4×5Á'ùs‚$&r„z at line %s.rrz2Parsing failed with several errors. First error %s)$rmrýrþÚfilenameÚosÚpathÚisfileÚopenÚ readlinesr5r‘r4ÚwriterSrarÝr$Ú_errorsÚ_handle_configspecr6rtrr€rlÚ _handle_bomÚendswithÚnewlinesÚallr2ÚrstripÚ_parser„r­rÚerrorsÚconfig) rOrur6ÚhÚcontentrêrƒrµÚinfor�Úerrorrs @rrtzConfigObj._loadÐs‰ø€Ü �fœc×.Ñ.Ô /Ø"ˆDŒMÜ�w‰w�~‰~˜fÔ%ܘ& $Ô'¨1ØŸk™k›mÒ1¨r�G÷(Ñ'à—’äÐ<¸t¿}¹}ÑLÓMÐMð×$Ò$ô˜f cÔ*¨aØŸ™ œ ÷+à‘ä ˜¤¤u  Ô .ܘ6“l‰Gä ˜¤Ô %ô˜&¤)Ô,ôPñ ˜F DÕ)ó$�EØ"(¨¡-�D˜’Kð$à� àÐ%Ø×'Ñ'¨ Ô3ð ð#'�”Ø ä �V˜V¤WÓ -´WÑ <à—k‘k“mÒ) r‰GôÐ\Ó]Ð ]á à×&Ñ& wÓ/ˆGó  �Ù $ r¡(°,Ñ">ØÛ/�CØ—}‘} SÕ)Ø(+˜œ Ùð0ñð ôÑJÁ'ÓJÔJÐYÌDÐQXËMÓYÐJÙ3:Ó;±7¨4�4—;‘;˜vÕ&°7ˆÐ;à � ‰ �GÔà �<Š<Ø  4§<¡<°¡?×#>Ñ#>Ñ>ˆDÜ�4—<‘<Ó  1Ò$ØKÈdÑR�Ü& sÓ+‘àŸ ™  Q™�ð Ÿ<™<ˆEŒLàˆEŒL؈Kà ˆLà Ð Ø"ˆD�Oà × #Ñ # JÕ /÷s(Ñ'ú÷+Ñ*üòpÑ"?ˆÔؘhÑ'ˆŒ à!ˆÔØˆÔØˆŒà �<Š<Ø$ˆDÔ ô ×јDÕ!rc óć—ˆfd„}ddj‰j‰jzD�cgc]!}t|«›dt||««›�‘Œ#c}«zScc}w)NcóZ•— ‰|S#t$rtj‰|«cYSwxYwrKr*r+s €rr,z#ConfigObj.__repr__.._getvalQr-r.zConfigObj({%s})r/r0r1r3s` rr4zConfigObj.__repr__Psbø€ô 3ð "Ø— ‘ Ø ŸL™L¨4¯=©=Ò8ó;Ù8�Cô)-¨S­ ´4¹À» Ô3EÒFØ8ñ;ó<ñ<ð =ùò;r5cóÀ—|j�<|jj«tvr|j||j«St |t t f«r|d}n|}t |tj«r|j||j«S|j��t|jj«}|dk(rlt tj««D]0\}\}}|sŒ |j|«sŒ|j||«cS|j||j«St|}|j|«s|j||j«S|t|«d}t |t t f«r||d<n|}d|_|j||j«St tj««D�]\}\}}t |tj«r|j|«sŒ6||_|s°d|_|t|«d}t |t t f«r||d<n|}t |tj«r|j!d«cSt |tj«r"|j#d«j!d«cS|j|d«cS|j||«cStj$r"t |t&«r|j|d«St |tj«r |j#d«j!d«S|j|d«S)a1 Handle any BOM, and decode if necessary. If an encoding is specified, that *must* be used - but the BOM should still be removed (and the BOM attribute set). (If the encoding is wrongly specified, then a BOM for an alternative encoding won't be discovered or removed.) If an encoding is not specified, UTF8 or UTF16 BOM will be detected and removed. The BOM attribute will be set. UTF16 will be decoded to unicode. NOTE: This method must not be called with an empty ``infile``. Specifying the *wrong* encoding is likely to cause a ``UnicodeDecodeError``. ``infile`` must always be returned as a list of lines, but may be passed in as a single string. Nrr Tr)rrrÚ_decodermrSrarýÚ text_typeÚBOMSrèÚ startswithÚBOM_SETr­ržÚ binary_typeÚ splitlinesÚdecodeÚPY2Ústr)rOrurƒÚencržrÚfinal_encodingÚnewlines rr‘zConfigObj._handle_bom[s½€ð.�]‰]Ð &Ø �]‰]× Ñ Ó "¬(Ñ 2ð—<‘< ¨¯ © Ó6Ð 6ä �fœt¤U˜mÔ ,ؘ!‘9‰DàˆDä �dœCŸM™MÔ *ð—<‘< ¨¯ © Ó6Ð 6à �=‰=Ñ $ô ˜4Ÿ=™=×.Ñ.Ó0Ñ1ˆCØ�hŠä7;¼D¿J¹J»LÖ7IÑ3�CÑ3˜( NÙ)à Ø×(Ñ(¨Õ-ð $Ÿ|™|¨F°HÓ=Ò=ð8Jð—|‘| F¨D¯M©MÓ:Ð:ô˜#‘,ˆCØ—?‘? 3Ô'Ø—|‘| F¨D¯M©MÓ:Ð:àœ3˜s›8˜9�oˆGô˜&¤4¬ -Ô0Ø#��q’ à �؈DŒHØ—<‘< ¨¯ © Ó6Ð 6ô04´D·J±J³L×/AÑ +ˆCÑ+�(˜Nܘd¤C§O¡OÔ4¸D¿O¹OÈCÔ‘> $§-¡-Ó0Ð 0àˆNrcó~—t|tj«r|jd«St|tj«r3|r |j |«jd«S|jd«S|rBt |«D]4\}}t|tj«sŒ!|j |«||<Œ6|S)zŽ Decode infile to unicode. Using the specified encoding. if is a string, it also needs converting to a list. T)rmrýrþrªr©r«Ú enumerate)rOrurr]rƒs rr¤zConfigObj._decodeØs €ô �fœc×.Ñ.Ô /Ø×$Ñ$ TÓ*Ð *Ü �fœcŸo™oÔ .áØ—}‘} XÓ.×9Ñ9¸$Ó?Ð?à×(Ñ(¨Ó.Ð.á Ü$ VÖ,‘��4ܘd¤C§O¡OÕ4ð!%§ ¡ ¨HÓ 5�F˜1’Ið -ð ˆ rcóˆ—t|tj«r'|jr|j |j«S|S)z'Decode element to unicode if necessary.)rmrýr©r9r«)rOrƒs rÚ_decode_elementzConfigObj._decode_elementñs2€ä �dœCŸO™OÔ ,°×1FÒ1FØ—;‘;˜t×4Ñ4Ó5Ð 5àˆKrcóP—t|tj«s t|«S|S)zh Used by ``stringify`` within validate, to turn non-string values into strings. )rmrýrþr­©rOrWs rÚ_strzConfigObj._strús%€ô ˜%¤×!1Ñ!1Ô2ô�u“:Ð àˆLrcóô—|j}|jrd|_g}d}|}t|«dz }d}d}||k�rù|rg}|dz }||} | j«} | r| j d«rd}|j | «ŒK|s ||_g}d}d}|jj| «} | ��D| j«\} } }}}| r|j€| |_ | jd«}||jd«k7r|jd t||«Œá||jkr |j||«j }nK||jk(r |j }n/||jdzk(r|}n|jd t||«�ŒY|j%|«}||vr|jd t&||«�Œˆt)||||¬ «}|||<||j*|<||j,|<�Œ¼|j.j| «} | €(|jdj1| «t2||«n÷| j«\} }}| r|j€| |_ |dddvr4 |j5||||«\}}}|jr?d} t|«}n0|jrd} t|«}n |jA|«\}}|j%|«}||vr|jdt&||«�ŒÄ|jC||d¬«||j*|<||j,|<�Œø||kr�Œù|j€d|_ |s|j s||_||_y|s||_"||_y#t"$r|jd t||«Y�ŒdwxYw#t6$r:}t9|«t:k(rd}nd}|j|t<||«Yd}~�Œ¦d}~wwxYw#t"$r|jdt2||«Y�ŒÒwxYw#t6$r8}t?|t:«rd}nd}|j|t<||«Yd}~�Œd}~wwxYw#t"$r|jdt2||«Y�Œ>wxYw)zActually parse the config file.Frr�Ú#TNÚ[Ú]z Cannot compute the section depthzCannot compute nesting levelzSection too nestedzDuplicate section name)rgz=Invalid line ({0!r}) (matched as neither section nor keyword)é)rbrarˆzUnknown name or type in valuez+Parse error from unrepr-ing multiline valuezParse error in multiline valuez!Parse error from unrepr-ing valuezParse error in valuezDuplicate keyword name)r:)#r3r:r­Ústripr§rrŸÚ_sectionmarkerr°Úgroupsr8ÚcountÚ _handle_errorr ræÚ _match_depthrvr…Ú_unquoter"r½rïrîÚ_keywordÚformatr!Ú _multilinerHÚtyper,r+rmÚ _handle_valuerr )rOruÚtemp_list_valuesÚ comment_listÚ done_startr~ÚmaxlineÚ cur_indexÚ reset_commentrƒÚslineÚmatÚindentÚ sect_openÚ sect_nameÚ sect_closeÚcommentÚ cur_depthrvr®rWÚer�s rr–zConfigObj._parseså€à×+Ñ+ÐØ �;Š;Ø$ˆDÔ àˆ Øˆ ؈ Ü�f“+ ‘/ˆØˆ ؈ à˜'Ó!ÙØ!� Ø ˜‰NˆIؘ)Ñ$ˆDØ—J‘J“LˆEá˜E×,Ñ,¨SÔ1Ø %� Ø×#Ñ# DÔ)Øáà'3�Ô$Ø!� Ø!� à ˆMà×%Ñ%×+Ñ+¨DÓ1ˆC؉àFIÇjÁjÃlÑC�˜ I¨z¸7Ù˜t×/Ñ/Ð7Ø'-�DÔ$Ø%ŸO™O¨CÓ0� Ø  × 0Ñ 0°Ó 5Ò5Ø×&Ñ&Ð'IÜ'3°V¸YôHàà˜|×1Ñ1Ò1ð!Ø!%×!2Ñ!2°<Ø3<ó">ß>D¹fñð  ,×"4Ñ"4Ò4à)×0Ñ0‘FØ ,×"4Ñ"4°qÑ"8Ò8à)‘Fà×&Ñ&Ð';Ü'3°V¸YôHáà ŸM™M¨)Ó4� Ø Ñ&Ø×&Ñ&Ð'?Ü'5°v¸yôJáô 'ØØØØ"ô  $� ð %1��yÑ!Ø4;�×&Ñ& yÑ1Ø-9�—‘  Ñ*Ùð—-‘-×%Ñ% dÓ+ˆC؈{Ø×"Ñ"ØS×ZÑZÐ[_Ó`Ü ¨ õ3ð (+§z¡z£|Ñ$�˜˜eÙ˜t×/Ñ/Ð7Ø'-�DÔ$à˜˜!�9 Ñ.ð)Ø48·O±OØ! 6¨9°gó5?Ñ1˜˜w¨ ð Ÿ;š;Ø&(˜Gð )Ü(.¨u« ¡ð—{’{Ø"$˜ð %Ü$*¨5£M™Eð%Ø/3×/AÑ/AÀ%Ó/HÑ,˜U Gð—m‘m CÓ(�ؘ,Ñ&Ø×&Ñ&Ø0Ü&¨° ô;ñð×(Ñ(¨¨e¸DÐ(ÔAØ4;� ×,Ñ,¨SÑ1Ø-9� ×%Ñ% cÑ*ÙðY˜'Ô!ð\ × Ñ Ð #à!ˆDÔ ñ˜D×0Ò0Ø#/ˆDÔ ð,ˆÕñØ!-ˆDÔ Ø+ˆÕøôe'ò!Ø×*Ñ*Ð+IÜ+7¸ÀôLâ ð!ûôx$-ò)Ü#'¨£7¬kÒ#9Ø*I¡Cà*W CØ $× 2Ñ 2°3¼ ÀVØ$-ô!/å (ûð)ûô'ò!Ø×*Ñ*Ø<Ü&¨° ô;ò!ð !ûô. )ò%Ü)¨!¬[Ô9Ø&E¡à&I Ø ×.Ñ.¨s´KÀØ )ô+å$ûð%ûô +ò%Ø ×.Ñ.Ø 6Ü *¨F°Iô?ò%ð %úsfÄ)M8É*O&Ê N Ê, PÊ9QÍ8!NÎNÎ O#Î)/OÏO#Ï&!P Ð P Ð QÐ-Q Ñ QÑ!Q7Ñ6Q7có¾—||jkr4||jur t«‚|j}||jkrŒ4|j|k(r|St«‚)zó Given a section and a depth level, walk back through the sections parents to see if the depth level matches a previous section. Return a reference to the right section, or raise a SyntaxError. )rærvr…)rOÚsectræs rrÅzConfigObj._match_depth®sV€ð�d—j‘jÒ Ø�t—{‘{Ñ"ä!“mÐ#Ø—;‘;ˆDð �d—j‘jÓ ð �:‰:˜Ò ؈Kä‹mÐrcó¢—||}|dz }dj||«}||||«}|jr|‚|jj|«y)z¬ Handle an error according to the error settings. Either raise the error or store it. The error will have occured at ``cur_index`` rz{0} at line {1}.N)rÈr2r�r)rOÚtextÚ ErrorClassrurÐrƒr‡rœs rrÄzConfigObj._handle_errorÁsY€ð�iÑ ˆØ�Q‰ˆ Ø$×+Ñ+¨D°)Ó<ˆÙ˜7 I¨tÓ4ˆØ × Ò àˆKð � ‰ ×јEÕ"rcóD—|st‚|d|dk(r |ddvr|dd}|S)z%Return an unquoted version of a valuerr�)Ú"Ú'r)r…r¹s rrÆzConfigObj._unquoteÔs6€áäÐ Ø �!‰H˜˜b™ Ò !¨¨a©°JÑ(>ؘ!˜B�KˆE؈ rc óv—|r|jr|dk(ry|rpt|ttf«rZ|syt |«dk(r|j |dd¬«dzSdj |D�cgc]}|j |d¬«‘Œc}«St|tj«s&|jr t|«}ntd|z«‚|sy |j xr d |vxrd |v}|xrd |vxrd |vxsd |v}|xr| xrd |vxr d |vxrd |v}|xs| xr| }|rX|jst}nVd |vrtd|z«‚|dtvr|dtvr d|vrt}n#|j!|«}n|j#|«}|tk(r!d |vr|jr|j!|«}||zScc}w)aÄ Return a safely quoted version of a value. Raise a ConfigObjError if the value cannot be safely quoted. If multiline is ``True`` (default) then use triple quotes if necessary. * Don't quote values that don't need it. * Recursively quote members of a list and return a comma joined list. * Multiline is ``False`` for lists. * Obey list syntax for empty and single member lists. If ``list_values=False`` then the value is only quoted if it contains a ``\n`` (is multiline) or '#'. If ``write_empty_values`` is set, and the value is an empty string, it won't be quoted. rˆÚ,rrF©Ú multiliner/zValue "%s" is not a string.ú""rƒr¼râráú#Value "%s" cannot be safely quoted.r�)r;rmrSrar­Ú_quoter¬rýrþr7r­rlr3ÚnoquotrÚ wspace_plusÚ_get_single_quoteÚ_get_triple_quote) rOrWrærÀÚno_lists_no_quotesÚ need_tripleÚhash_triple_quoteÚcheck_for_singleÚquots rrézConfigObj._quoteÞs÷€ñ& ˜×0Ò0°U¸b²[ðá œ E¬D´%¨=Ô9ÙØÜ�U“˜q’Ø—{‘{ 5¨¡8°u�{Ó=ÀÑCÐCØ—9‘9Ù ó"Ù �Cð#Ÿk™k¨#¸˜kÕ?Ø ñ"ó#ð #ä˜%¤×!1Ñ!1Ô2Ø�~Š~ô˜E› ‘äÐ =ÀÑ EÓFÐFáØà!%×!1Ñ!1Ð1Ò\°dÀ%Ð6GÒ\ÈCÐW\ÐL\ÐØÒ] s¨e |Ò&G¸#À¸,Ò%\ÈTÐUZÈ]ˆ Ø%Òr¨k¨/Òr¸sÀe¸|ÒrÐRUÐY^ÐR^ÒrÐehÐlqÐeqÐØ.ÒA°k°/Ò\ÐK\ÐG\Ðá Ø×#Ò#ä‘à˜‘ä$Ð%JÈUÑ%RÓSÐSؘ‘8¤;Ñ.ؘ2‘Y¤kÑ1Ø Ñ%Ü‘à×-Ñ-¨eÓ4‘ð×)Ñ)¨%Ó0ˆDà ”6Š>˜c U™l¨t×/?Ò/?Ø×)Ñ)¨%Ó0ˆDà�e‰|ÐùòO"sÁ&F6cóV—d|vrd|vrtd|z«‚d|vrt}|St}|S)Nrârárè)rÚsquotÚdquot©rOrWròs rrìzConfigObj._get_single_quote%s?€Ø �5‰L˜s e™|Ü Ð!FÈÑ!NÓOÐ OØ �E‰\܈Dðˆ ôˆD؈ rcó¶—|jd«dk7r"|jd«dk7rtd|z«‚|jd«dk(rt}|St}|S)Nrbr�rarè)ÚfindrÚtdquotÚtsquotrös rrízConfigObj._get_triple_quote/s]€Ø �J‰J�uÓ  Ò #¨%¯*©*°UÓ*;¸rÒ*AÜ Ð!FÈÑ!NÓOÐ OØ �:‰:�eÓ  Ò "܈Dðˆ ôˆD؈ rcó4—|jr|dfS|js7|jj|«}|€ t «‚|j «S|j j|«}|€ t «‚|j «\}}}}|dk(r |€ t «‚|�g|fS|�|r|sd}n|xsd}|j|«}|dk(r||fS|jj|«}|D�cgc]}|j|«‘Œ}}|�||gz }||fScc}w)z€ Given a value string, unquote, remove comment, handle lists. (including empty and single member lists) rˆNrç) rnr3Ú _nolistvaluer°r…rÂÚ _valueexprÆÚ _listvalueexpÚfindall) rOrWrÓr3ÚsingleÚ empty_listrØr@rÀs rrËzConfigObj._handle_value9s;€ð �<Š<à˜2�;Ð à×ÒØ×#Ñ#×)Ñ)¨%Ó0ˆC؈{Ü!“mÐ#à—:‘:“<Ð à�n‰n×"Ñ" 5Ó)ˆØ ˆ;ô“-Ð Ø58·Z±Z³\Ñ2ˆ�f˜j¨'Ø ˜2Ò  F Nä“-Ð ð Ð !à˜�=Ð Ø Ð á¡6ð‘àš 4�ØŸ™ vÓ.�Ø ˜"Ò à˜GÐ$Ð $Ø×%Ñ%×-Ñ-¨kÓ:ˆÙ2:Ó;±(¨3�D—M‘M #Õ&°(ˆÐ;Ø Ð Ø ˜˜Ñ ˆHؘ'Ð"Ð"ùòÓ?‰Cä�zÓ"ˆCÙ,Ø#×3Ñ3°D·K±KÀÐQV°KÓ4WÔXØ#Ÿ|™|¨EÔ2Ù"Ø#×3Ñ3°GÔ<ð >ð >rcóÀ—|›|jd|z«›|j|j|«d¬«›|jd|z«›|j|«›�S)zWrite a section marker liner½Frår¾)r³rér·)rOrrærêrØs rÚ _write_markerzConfigObj._write_markerÌsY€á,Ø#Ÿ|™|¨C°%©KÔ8Ø#Ÿ{™{¨4×+?Ñ+?ÀÓ+FÐRW˜{ÔXØ#Ÿ|™|¨C°%©KÔ8Ø#×3Ñ3°GÔ<ð >ð >rcót—|sy|j}|jd«s||jd«z }||zS)zDeal with a comment.rˆr¼z # )r8r§r³)rOrØr´s rÚ_handle_commentzConfigObj._handle_commentÕs>€áØØ× Ñ ˆØ×!Ñ! #Ô&Ø �T—\‘\ %Ó(Ñ (ˆEؘ‘Ð rc óè—|j€ t|_g}|jd«}|jd«}|€p|j}d|_|}|jD]L}|j |«}|j «}|r|j|«s||z}|j|«ŒN|j|jz} |j|jzD�]} | |jvrŒ|j| D]M} |j | j««} | r| j|«s|| z} |j| | z«ŒO|| } |j|j | «} t#| t$«rO|j|j'| | j| | ««|j)|j+| ¬««Œô|j|j-| | | | ««�Œ||urb|j.D]L}|j |«}|j «}|r|j|«s||z}|j|«ŒN|_||ur|S|j0€¢|€ |j2r(|D�cgc]}|j5|j2«‘Œ}}|j6r^|j2�0t8j;|j2j=««dk(r"|s|jd«t>|dz|d<|S|j@xstBjD}tG|d d«�)|jHd k(rtJjLd k(r|d k(rd }|j|«jO|«}|jQ|«s||z }t#|tRjT«r|}n-|j5|j2xs|jVxsd«}|j6r*|j2�tY|j2«r t>|z}|�|j+|«yt[|j0d«5}|j+|«ddd«ycc}w#1swYyxYw)a~ Write the current ConfigObj as a file tekNico: FIXME: use StringIO instead of real files >>> filename = a.filename >>> a.filename = 'test.ini' >>> a.write() >>> a.filename = filename >>> a == ConfigObj('test.ini', raise_errors=True) 1 >>> import os >>> os.remove('test.ini') Nr¼z# Fr¤r rˆrÚmoder{Úwin32r„rƒÚasciiÚwb).r8rr³r1rŸr·rÀr§rrærìrírðrîÚlstriprrïrmr½rÚextendrŽrr rˆrÚencoderžrrrrr“r‰ÚlineseprtrÚsysÚplatformr¬r’rýr©r9rrŒ)rOÚoutfiler¥rLÚcsÚcspÚint_valrƒÚ stripped_linerrêÚ comment_liner8rØÚlr°ÚoutputÚ output_bytesr™s rrŽzConfigObj.writeásò€ð × Ñ Ð #ä2ˆDÔ àˆØ �\‰\˜#Ó ˆØ�l‰l˜4Ó ˆØ ˆ?Ø×(Ñ(ˆGØ!&ˆDÔ ØˆGØ×,Ô,�Ø×+Ñ+¨DÓ1�Ø $§ ¡ £ � Ù ¨×)AÑ)AÀ"Ô)EØ ™:�DØ— ‘ ˜4Õ ð -ð×(Ñ(¨7¯=©=Ñ8ˆ Ø—o‘o¨×(8Ñ(8Õ8ˆEؘ×(Ñ(Ñ(àØ '× 0Ñ 0°Ô 7� Ø#×3Ñ3°L×4GÑ4GÓ4IÓJ� Ù¨ ×(?Ñ(?ÀÔ(CØ#&¨Ñ#5�LØ— ‘ ˜=¨<Ñ7Õ8ð !8ð ! ™ˆJØ×*Ñ*¨7×+BÑ+BÀ5Ñ+IÓJˆGä˜*¤gÔ.à— ‘ ˜4×-Ñ-Ø!Ø×$Ñ$ØØó ôð — ‘ ˜4Ÿ:™:¨j˜:Ó9Õ:à— ‘ ˜4×+Ñ+Ø!ØØØó öð+9ð6 �d‰?Ø×*Ô*�Ø×+Ñ+¨DÓ1�Ø $§ ¡ £ � Ù ¨×)AÑ)AÀ"Ô)EØ ™:�DØ— ‘ ˜4Õ ð +ð ")ˆDÔ à ˜$Ñ ØˆJà �M‰MÐ !¨¨ð�}Š}Ù8;Ó<¹°1�q—x‘x § ¡ Õ.¸�Ð<Ø—’˜tŸ}™}Ð4Ü—‘˜dŸm™m×1Ñ1Ó3Ó4¸Ò?áØ—J‘J˜r”NÜ! C¨¡FÑ*��A‘؈Jð—-‘-Ò-¤2§:¡:ˆÜ �G˜V TÓ *Ð 6¸7¿<¹<È3Ò;NÜ— ‘  Ò'¨G°vÒ,=àˆGØ—‘˜gÓ&×+Ñ+¨CÓ0ˆØ�‰˜wÔ'Ø �gÑ ˆFä �fœcŸo™oÔ .Ø!‰Là!Ÿ=™=¨¯©ò*1Ø)-×)>Ñ)>ò*1à)0ó2ˆLð �8Š8˜$Ÿ-™-Ð/´J¸t¿}¹}Ô4Mä# lÑ2ˆLà Ð Ø �M‰M˜,Õ 'ä�d—m‘m TÔ*¨aØ—‘˜ Ô%÷+Ð*ùòC=÷B+Ð*úsÊ"Q#ÑQ(Ñ(Q1c 󨇇‡‡‡‡‡—‰€Ì‰j€ td«‚‰r ddlm}|‰_‰Š‰r¢‰jj ‰_‰jj ‰_‰jj‰_‰jj‰_‰jj‰_ ‰jj‰_ ‰jЉj‰‰«ˆˆˆˆˆˆˆfd„}iŠd}d}‰jD� cgc] } | ‰vsŒ| ‘Œ } } ‰jD� cgc]} | ‰jvsŒ| ‘Œ} } ‰jD� cgc]} | ‰jvsŒ| ‘Œ} } ‰jD]¤} | dvrŒ| ‰jvs| ‰jvrgd}d}‰rh| ‰jvrZ‰jj!| g«‰j| <‰j"j!| d«‰j"| <nd }‰| }|| ‰| ||||«\}}Œ¦d}d ‰jvr‰d }nd ‰jvr‰d }|�| D]} ‰| }|| ||d ||«\}}Œg} | D]'} d }‰sd ‰| <Œ d }d | z}‰j%|«‰| <Œ)| D]'} d }‰sd ‰| <Œ d }d | z}‰j%|«‰| <Œ)‰jD]°} ‰‰ur| dk(rŒ ‰| j€| j'| «Œ.‰rR‰jj!| g«‰j| <‰j"j!| d«‰j"| <‰j)‰‰‰‰| ¬«}|‰| <|d k(rd }Œ§|dk(rd }Œ¯d }Œ²| ‰_‰r‰j,sd }|r‰r‰rt/‰j1«« }|ry|ry ‰Scc} wcc} wcc} w)a; Test the ConfigObj against a configspec. It uses the ``validator`` object from *validate.py*. To run ``validate`` on the current ConfigObj, call: :: test = config.validate(validator) (Normally having previously passed in the configspec when the ConfigObj was created - you can dynamically assign a dictionary of checks to the ``configspec`` attribute of a section though). It returns ``True`` if everything passes, or a dictionary of pass/fails (True/False). If every member of a subsection passes, it will just have the value ``True``. (It also returns ``False`` if all members fail). In addition, it converts the values from strings to their native types if their checks pass (and ``stringify`` is set). If ``preserve_errors`` is ``True`` (``False`` is default) then instead of a marking a fail with a ``False``, it will preserve the actual exception object. This can contain info about the reason for failure. For example the ``VdtValueTooSmallError`` indicates that the value supplied was too small. If a value (or section) is missing it will still be marked as ``False``. You must have the validate module to use ``preserve_errors=True``. You can then use the ``flatten_errors`` function to turn your nested results dictionary into a flattened list of failures - useful for displaying meaningful error messages. NzNo configspec supplied.r)ÚVdtMissingValuecóÖ•—‰ jj|d« ‰j‰ |«‰ j|< ‰j |||¬«}d}d‰ |<‰js|re‰jsMt|ttf«r|D�cgc]}‰j|«‘Œ}}n|r|€d}n‰j|«}||k7s|r|‰ |<‰ s+|r)|‰ jvr‰ jj|«||fS#tt‰j f$rYŒÜwxYwcc}w#‰j $r4}‰ rt|‰j«rd‰ |<n|‰ |<d}d}Yd}~||fSd}~wwxYw)N)ÚmissingFTrˆ)rñrÚget_default_valuer röÚbaseErrorClassÚcheckr7rmrSrarºrðrÚ_vdtMissingValue)rêÚspecrÀr,Úret_trueÚ ret_falser/ÚitemrÚr6r rLÚpreserve_errorsr¥rOÚ validators €€€€€€€rÚvalidate_entryz*ConfigObj.validate..validate_entry�s†ø€Ø × "Ñ "× &Ñ & u¨dÔ 3ð Ø09×0KÑ0KÈJÐW\ÑL]Ó0^�×&Ñ& uÑ-ð  3Ø!Ÿ™¨Ø(+Ø07ð(ó*�ð"� Ø!��E‘ Ø—>’>¡Wð Ÿ>š>Ü% e¬d´E¨]Ô;áAFÓ$GÁ¸ T§Y¡Y¨t¥_À˜EÑ$GÙ$¨¨à$&™Eà$(§I¡I¨eÓ$4˜EØ š ©Ø).˜ ™Ù¡¨E¸×9IÑ9IÑ,IØ×$Ñ$×+Ñ+¨EÔ2ؘYÐ&Ð &øôKœn¨i×.FÑ.FÐGò ñð üò6%Høð#×+Ñ+ò !Ù&¬*°Q¸×8MÑ8MÔ*NØ!&�C˜’Jð"#�C˜‘JØ %�IØ ”ð(˜YÐ&Ð &ûð7 !ús/Ÿ!DÁD%ÂD ÄDÄDÄ%E(Ä4'E#Å#E(T)r Ú ___many___rˆFr r8z"Value %r was provided as a sectionz)Section %r was provided as a single valuer»)r5r r¥)r6rÚconfigobj.validater*r0rŸr rržr“r8r rìrírðrîrrïr.rÚvalidateròróÚanyr)rOr6r5r r¥r*r7r2r3r±Ú unvalidatedÚincorrect_sectionsÚincorrect_scalarsrêr,rÀr r�r/r6rLs````` @@rr:zConfigObj.validateSsFþ€ðH ˆ?Ø�‰Ð&Ü Ð!:Ó;Ð;Ùõ?Ø(7�Ô%àˆGáØ*1×*<Ñ*<×*LÑ*L�Ô'Ø(/×(:Ñ(:×(HÑ(H�Ô%Ø#*×#5Ñ#5×#>Ñ#>�Ô Ø%×0Ñ0×4Ñ4�” Ø#*×#5Ñ#5×#>Ñ#>�Ô Ø&-×&8Ñ&8×&DÑ&D�Ô#ð×'Ñ'ˆ Ø ×јW dÔ+÷* 'ò* 'ðZˆØˆØˆ à")§/¢/ÓI¡/˜Q°Q¸jÒ5H’q /ˆ ÐIØ)3×)<Ò)<ÓUÑ)< AÀÀWÇ_Á_Ò@TšaÐ)<ÐÐUØ(2×(:Ò(:ÓTÑ(: 1¸aÀ7×CSÑCSÒ>SšQÐ(:ÐÐTà×'Ô'ˆEØÐ2Ñ2àØ˜WŸ_™_Ñ,°%¸7×;KÑ;KÑ2Kð�Ø�Ù˜E¨¯©Ñ8ð#×+Ñ+×/Ñ/°°rÓ:ð×$Ñ$ UÑ+ð#×2Ñ2×6Ñ6°u¸bÓAð×+Ñ+¨EÒ2ð �ؘe‘n�á"0°¸ À5Ñ8IÈ3Ø18¸(ÀIó#OÑ ˆH‘ið)(ð.ˆØ ˜×+Ñ+Ñ +ؘjÑ)‰DØ ˜Z×/Ñ/Ñ /ؘlÑ+ˆDà Ð Û$�ؘe‘n�Ù&4°U¸DÀ#ÀuØ5=¸yó'JÑ#�™)ð%ðˆKã&ˆE؈HÙ"Ø"��E’ à!� Ø:¸UÑB�Ø&×5Ñ5°cÓ:��E’ ð'ó(ˆE؈HÙ"Ø"��E’ à!� ØAÀEÑI�Ø&×5Ñ5°cÓ:��E’ ð(ð×%Ô%ˆEà˜$‰ 5¨IÒ#5ØØ�u‰~×(Ñ(Ð0Ø×"Ñ" 5Ô)ØÙØ*4×*=Ñ*=×*AÑ*AÀ%ÈÓ*L�× Ñ  Ñ'Ø1;×1KÑ1K×1OÑ1OÐPUÐWYÓ1Z�×'Ñ'¨Ñ.Ø—M‘M )¸_ÐSWÐahÐinÑao�MÓpˆE؈C�‰JؘŠ~Ø ‘ؘ$’Ø!‘ à ‘ð#&ð& +ˆÔÙ  7×#3Ò#3ðˆIá ™©Sô   § ¡ £ Ó-Ð-ˆIÙ ØÙ ØØˆ ùò}JùÚUùÚTs$Ä OÄOÄ1O ÅO ÅOÅ-Ocó`—|j«|j«d|_d|_y)z@Clear ConfigObj instance and restore to 'freshly created' state.N)rrçr6rsr’s rÚresetzConfigObj.reset" s(€à � ‰ Œ Ø ×ÑÔðˆŒà$(ˆÕ!rcóD—t|jtj«s t «‚|j}i}t D]}|dk(rŒ t ||«||<Œ|j}||d<|j«|j|«|j||«y)z´ Reload a ConfigObj from file. This method raises a ``ReloadError`` if the ConfigObj doesn't have a filename attribute pointing to a file. r6N) rmrˆrýrþr*rrrtrsrrçrt)rOrˆÚcurrent_optionsrêr6s rÚreloadzConfigObj.reload- s�€ô˜$Ÿ-™-¬×)9Ñ)9Ô:Ü“-Ð à—=‘=ˆØˆß$ˆEؘ Ò$ØÜ%,¨T°5Ó%9ˆO˜EÒ "ð%ð ×.Ñ.ˆ Ø(2ˆ˜ Ñ%à � ‰ Œ Ø ×јÔ)Ø � ‰ �8˜ZÕ(r)NNNNTFTFFTNNFFFrK)Tr\)FFN)-rDrErFrŠrÄrÅrÔrÇrÁrýrþrüÚ_single_line_singleÚ_single_line_doubleÚ_multi_line_singleÚ_multi_line_doublerrNr†rtrçr4r‘r³r¤r·rºr–rÅrÄrÆrérìrírËrÉr�r rrrrŽr:r@rCrGrrr$r$/sØ„Ù<àˆr�z‰zð  ð � ‰ ó €Hð �R—Z‘Zð ! ð � ‰ ó €Nð"�— ‘ ð ð0 � ‰ ó1€Ið6�B—J‘Jð ð � ‰ ó€Mð�2—:‘:ð ð � ‰ ó €Lð%˜"Ÿ*™*Ð%>Ó?ÐØ$˜"Ÿ*™*Ð%>Ó?ÐØ#˜Ÿ™Ð$:Ó;ÐØ#˜Ÿ™Ð$:Ó;Ðð$Ð%7Ð8Ø#Ð%7Ð8ñ€Mð˜5ؘ5Ø ˜Ø˜uñ  €FðMQØEIØAEØAFØ38ó 7'òt]0ó@"ò@=òr1òjòò2ò òd,òNò&#ò&óDòNòò.#òb 6òF%ò*>ò8 >ò>ò!óp&ðd?DØóLò^)ó)rr$có—eZdZdZd„Zdd„Zy)r%aÖ A simple validator. Can be used to check that all members expected are present. To use it, provide a configspec with all your members in (the value given will be ignored). Pass an instance of ``SimpleVal`` to the ``validate`` method of your ``ConfigObj``. ``validate`` will return ``True`` if all members are present, or a dictionary with True/False meaning present/missing. (Whole missing sections will be replaced with ``False``) có—t|_yrK)rr.r’s rr†zSimpleVal.__init__S s €Ü,ˆÕrcó*—|r|j«‚|S)z9A dummy check method, always returns the value unchanged.)r.)rOr/Úmemberr,s rr/zSimpleVal.checkV s€á Ø×%Ñ%Ó'Ð '؈ rNr])rDrErFrŠr†r/rGrrr%r%G s„ñ ò-ôrr%cóú—|€g}g}|dk(r t|«S|dk(st|t«r4|j|ddd|f«|r|j «t|«St |j ««D]d\}}|dk(rŒ t|j|«t«r#|j|«t|||||«ŒN|j|dd||f«Œf|r|j «t|«S)aã An example function that will turn a nested dictionary of results (as returned by ``ConfigObj.validate``) into a flat list. ``cfg`` is the ConfigObj instance being checked, ``res`` is the results dictionary returned by ``validate``. (This is a recursive function, so you shouldn't use the ``levels`` or ``results`` arguments - they are used by the function.) Returns a list of keys that failed. Each member of the list is a tuple:: ([list of sections...], key, result) If ``validate`` was called with ``preserve_errors=False`` (the default) then ``result`` will always be ``False``. *list of sections* is a flattened list of sections that the key was found in. If the section was missing (or a section was expected and a scalar provided - or vice-versa) then key will be ``None``. If the value (or section) was missing then ``result`` will be ``False``. If ``validate`` was called with ``preserve_errors=True`` and a value was present, but failed the check, then ``result`` will be the exception object returned. You can use this as a string that describes the failure. For example *The value "3" is of the wrong type*. NTF) ÚsortedrmrHrrrSrèrrÝr-)ÚcfgÚresÚlevelsÚresultsr®rÀs rr-r-] sç€ð@€~àˆØˆØ ˆd‚{Ü�g‹ÐØ ˆe‚|”z #¤yÔ1Ø�‰˜™q˜  4¨Ð-Ô.Ù Ø �J‰JŒLÜ�g‹Ðܘ3Ÿ9™9›;Ö'‰ ˆˆcØ �$Š;Ø Ü �c—g‘g˜c“l¤DÔ )à �M‰M˜#Ô Ü ˜3˜s™8 S¨&°'Ô :Ø Ø�‰˜™q˜  3¨Ð,Õ-ð(ñØ� ‰ Œ ä �'‹?Ðrcóî—g}|j|jD�cgc]}||f‘Œc}«|jD]3}||jvsŒ|jt||||fz««Œ5|Scc}w)aô Find all the values and sections not in the configspec from a validated ConfigObj. ``get_extra_values`` returns a list of tuples where each tuple represents either an extra section, or an extra value. The tuples contain two values, a tuple representing the section the value is in and the name of the extra values. For extra values in the top level section the first member will be an empty tuple. For values in the 'foo' section the first member will be ``('foo',)``. For members in the 'bar' subsection of the 'foo' section the first member will be ``('foo', 'bar')``. NOTE: If you call ``get_extra_values`` on a ConfigObj instance that hasn't been validated it will return an empty list. )rròrír.)ÚconfÚ_prependrLrgs rr.r.™ sy€ð" €Cà‡J�J¨T×->Ò->Ó?Ñ-> T�˜4Ò Ð->Ñ?Ô@Ø— ” ˆØ �t×(Ñ(Ò (Ø �J‰JÔ'¨¨T© °HÀ¸wÑ4FÓGÕ Hðð €Jùò @sœ A2r\)rG);r‰rÄrÚcodecsrrrrrýÚ_versionrr=r¦rr¨rrôrõrêrërúrùÚobjectrÚ__all__rrÚMAX_INTERPOL_DEPTHrrrBrHr,rIÚ_builderr:r…rr r!r‘r*r"r#r&r'r)r(r+r rÇrÌr÷rÚrÝr½r$r%r-r.rGrrÚr[s7ðó  Û Û çBÓBã Ý!ð €ð  ˆoØÐ(ØÐ(Ø Ð#ð €ðØ Ø ØØØØØØØØ Ø Ø Ø Ø ñ €ð(ØØØØ ñ  €ò5ð €Ø€Ø €Ø€ Ø €Ø €ñ ‹(€ð €ð*'ÐØÐØÐðØØØØØØàØØØØñ€ò(@ô �)ô ô44ˆfô44ñn ‹9€òô,�[ô,ô�>ôô �ôôF�'ôFô�^ôô �nôô 7˜ô7ôCÐ/ôCô˜ôô/Ð!3ô/ô+�.ô+ô x$˜&ôx$ôx#Ð 3ô#ô)Ð/ô)ð6.Ø%ñÐò #ôb -ˆdôb -ôJT)�ôT)ôp(�ôó,9óxð4Hr