AlkantarClanX12

Your IP : 18.188.227.192


Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/configparser.cpython-37.opt-2.pyc

B

YI~d��@s�ddlmZddlmZmZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
dddddd	d
ddd
dddddddddddgZdZdZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGd d�de�ZGd!d�de�ZGd"d
�d
e�ZGd#d�de�ZGd$d	�d	e�ZGd%d�de�ZGd&d
�d
e�Ze�ZGd'd�d�ZGd(d�de�Z Gd)d�de�Z!Gd*d�de�Z"Gd+d�de�Z#Gd,d�de#�Z$Gd-d�de$�Z%Gd.d�de�Z&Gd/d�de�Z'dS)0�)�MutableMapping)�OrderedDict�ChainMapN�NoSectionError�DuplicateOptionError�DuplicateSectionError�
NoOptionError�InterpolationError�InterpolationDepthError�InterpolationMissingOptionError�InterpolationSyntaxError�ParsingError�MissingSectionHeaderError�ConfigParser�SafeConfigParser�RawConfigParser�
Interpolation�BasicInterpolation�ExtendedInterpolation�LegacyInterpolation�SectionProxy�ConverterMapping�DEFAULTSECT�MAX_INTERPOLATION_DEPTHZDEFAULT�
c@s"eZdZddd�Zdd�ZeZdS)�Error�cCs||_t�||�dS)N)�message�	Exception�__init__)�self�msg�r"�1/opt/alt/python37/lib64/python3.7/configparser.pyr�szError.__init__cCs|jS)N)r)r r"r"r#�__repr__�szError.__repr__N)r)�__name__�
__module__�__qualname__rr$�__str__r"r"r"r#r�s
rc@seZdZdd�ZdS)rcCs$t�|d|f�||_|f|_dS)NzNo section: %r)rr�section�args)r r)r"r"r#r�szNoSectionError.__init__N)r%r&r'rr"r"r"r#r�sc@seZdZddd�ZdS)rNcCs�t|�dg}|dk	rRdt|�g}|dk	r8|�d�|��|�d�|�|�|}n|�dd�t�|d�|��||_||_	||_
|||f|_dS)Nz already existszWhile reading from z [line {0:2d}]z
: section rzSection r)�repr�append�format�extend�insertrr�joinr)�source�linenor*)r r)r1r2r!rr"r"r#r�s

zDuplicateSectionError.__init__)NN)r%r&r'rr"r"r"r#r�sc@seZdZddd�ZdS)rNcCs�t|�dt|�dg}|dk	rZdt|�g}|dk	r@|�d�|��|�d�|�|�|}n|�dd�t�|d�|��||_||_	||_
||_||||f|_dS)	Nz in section z already existszWhile reading from z [line {0:2d}]z	: option rzOption r)
r+r,r-r.r/rrr0r)�optionr1r2r*)r r)r3r1r2r!rr"r"r#r�s 

zDuplicateOptionError.__init__)NN)r%r&r'rr"r"r"r#r�sc@seZdZdd�ZdS)rcCs.t�|d||f�||_||_||f|_dS)NzNo option %r in section: %r)rrr3r)r*)r r3r)r"r"r#r�s
zNoOptionError.__init__N)r%r&r'rr"r"r"r#r�sc@seZdZdd�ZdS)r	cCs(t�||�||_||_|||f|_dS)N)rrr3r)r*)r r3r)r!r"r"r#rszInterpolationError.__init__N)r%r&r'rr"r"r"r#r	�sc@seZdZdd�ZdS)rcCs8d�||||�}t�||||�||_||||f|_dS)Nz�Bad value substitution: option {!r} in section {!r} contains an interpolation key {!r} which is not a valid option name. Raw value: {!r})r-r	r�	referencer*)r r3r)�rawvalr4r!r"r"r#r
s
z(InterpolationMissingOptionError.__init__N)r%r&r'rr"r"r"r#rsc@seZdZdS)rN)r%r&r'r"r"r"r#rsc@seZdZdd�ZdS)r
cCs0d�||t|�}t�||||�|||f|_dS)Nz�Recursion limit exceeded in value substitution: option {!r} in section {!r} contains an interpolation key which cannot be substituted in {} steps. Raw value: {!r})r-rr	rr*)r r3r)r5r!r"r"r#rs
z InterpolationDepthError.__init__N)r%r&r'rr"r"r"r#r
sc@s8eZdZd	dd�Zedd��Zejdd��Zdd�ZdS)
r
NcCsT|r|rtd��n|s$|s$td��n|r,|}t�|d|�||_g|_|f|_dS)Nz:Cannot specify both `filename' and `source'. Use `source'.z%Required argument `source' not given.z"Source contains parsing errors: %r)�
ValueErrorrrr1�errorsr*)r r1�filenamer"r"r#r+s

zParsingError.__init__cCstjdtdd�|jS)NzSThe 'filename' attribute will be removed in future versions.  Use 'source' instead.�)�
stacklevel)�warnings�warn�DeprecationWarningr1)r r"r"r#r8:s
zParsingError.filenamecCstjdtdd�||_dS)NzSThe 'filename' attribute will be removed in future versions.  Use 'source' instead.r9)r:)r;r<r=r1)r �valuer"r"r#r8Ds
cCs*|j�||f�|jd||f7_dS)Nz
	[line %2d]: %s)r7r,r)r r2�liner"r"r#r,NszParsingError.append)NN)r%r&r'r�propertyr8�setterr,r"r"r"r#r
(s


c@seZdZdd�ZdS)rcCs8t�|d|||f�||_||_||_|||f|_dS)Nz7File contains no section headers.
file: %r, line: %d
%r)rrr1r2r?r*)r r8r2r?r"r"r#rVsz"MissingSectionHeaderError.__init__N)r%r&r'rr"r"r"r#rSsc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
rcCs|S)Nr")r �parserr)r3r>�defaultsr"r"r#�
before_getjszInterpolation.before_getcCs|S)Nr")r rBr)r3r>r"r"r#�
before_setmszInterpolation.before_setcCs|S)Nr")r rBr)r3r>r"r"r#�before_readpszInterpolation.before_readcCs|S)Nr")r rBr)r3r>r"r"r#�before_writesszInterpolation.before_writeN)r%r&r'rDrErFrGr"r"r"r#rgsc@s.eZdZe�d�Zdd�Zdd�Zdd�ZdS)	rz
%\(([^)]+)\)sc	Cs$g}|�||||||d�d�|�S)N�r)�_interpolate_somer0)r rBr)r3r>rC�Lr"r"r#rD�szBasicInterpolation.before_getcCs<|�dd�}|j�d|�}d|kr8td||�d�f��|S)Nz%%r�%z1invalid interpolation syntax in %r at position %d)�replace�_KEYCRE�subr6�find)r rBr)r3r>�	tmp_valuer"r"r#rE�szBasicInterpolation.before_setc
Csp|j||d|d�}|tkr&t|||���xB|�rj|�d�}	|	dkrP|�|�dS|	dkrv|�|d|	��||	d�}|dd�}
|
dkr�|�d�|dd�}q*|
dk�rV|j�|�}|dkr�t||d|��|�|�	d��}||�
�d�}y||}
Wn&tk
�r"t||||�d�YnXd|
k�rJ|�
||||
|||d�n
|�|
�q*t||d	|f��q*WdS)
NT)�raw�fallbackrKrrHr9�(z'bad interpolation variable reference %rz/'%%' must be followed by '%%' or '(', found: %r)�getrr
rOr,rM�matchr�optionxform�group�end�KeyErrorrrI)r rBr3�accum�restr)�map�depthr5�p�c�m�var�vr"r"r#rI�sF






z$BasicInterpolation._interpolate_someN)	r%r&r'�re�compilerMrDrErIr"r"r"r#rws
c@s.eZdZe�d�Zdd�Zdd�Zdd�ZdS)	rz
\$\{([^}]+)\}c	Cs$g}|�||||||d�d�|�S)NrHr)rIr0)r rBr)r3r>rCrJr"r"r#rD�sz ExtendedInterpolation.before_getcCs<|�dd�}|j�d|�}d|kr8td||�d�f��|S)Nz$$r�$z1invalid interpolation syntax in %r at position %d)rLrMrNr6rO)r rBr)r3r>rPr"r"r#rE�sz ExtendedInterpolation.before_setcCs�|j||d|d�}|tkr&t|||���x�|�r�|�d�}	|	dkrP|�|�dS|	dkrv|�|d|	��||	d�}|dd�}
|
dkr�|�d�|dd�}q*|
dk�r�|j�|�}|dkr�t||d|��|�d��	d	�}||�
�d�}|}
|}yrt|�dk�r |�|d�}||}nHt|�dk�rV|d}
|�|d�}|j|
|dd
�}nt||d|f��Wn2t
ttfk
�r�t|||d	�|��d�YnXd|k�r�|�|||||
t|j|
dd
��|d�n
|�|�q*t||d|f��q*WdS)
NT)rQrRrerrHr9�{z'bad interpolation variable reference %r�:)rQzMore than one ':' found: %rz-'$' must be followed by '$' or '{', found: %r)rTrr
rOr,rMrUrrW�splitrX�lenrVrYrrrr0rI�dict�items)r rBr3rZr[r)r\r]r5r^r_r`�pathZsect�optrbr"r"r#rI�s^







z'ExtendedInterpolation._interpolate_someN)	r%r&r'rcrdrMrDrErIr"r"r"r#r�s
c@s2eZdZe�d�Zdd�Zdd�Zedd��Z	dS)	rz%\(([^)]*)\)s|.c

Cs�|}t}x�|r�|d8}|r�d|kr�tj|j|d�}|j�||�}y||}Wq�tk
r�}	zt||||	jd�d�Wdd}	~	XYq�Xq
Pq
W|r�d|kr�t	|||��|S)NrHz%()rBr)
r�	functools�partial�_interpolation_replacerMrNrYrr*r
)
r rBr)r3r>�varsr5r]rL�er"r"r#rDs"(zLegacyInterpolation.before_getcCs|S)Nr")r rBr)r3r>r"r"r#rE#szLegacyInterpolation.before_setcCs,|�d�}|dkr|��Sd|�|�SdS)NrHz%%(%s)s)rWrV)rUrB�sr"r"r#rp&s
z*LegacyInterpolation._interpolation_replaceN)
r%r&r'rcrdrMrDrE�staticmethodrpr"r"r"r#r	s
c
s2eZdZdZdZdZe�Ze�	eej
�Ze�	ejdd�ej
�Z
e�	ejdd�ej
�Ze�	d�Zddddddddd	�Zd
edfddd
ddeeed
�dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdcdd�Zdddd�Zdedd �Zdfd"d#�Zdgd$d%�Zdd
ed&�d'd(�Zd)d*�Z dd
ed&�d+d,�Z!dd
ed&�d-d.�Z"dd
ed&�d/d0�Z#dd
ed&�d1d2�Z$edd
f�fd3d4�	Z%d5d6�Z&d7d8�Z'd9d:�Z(dhd;d<�Z)did=d>�Z*d?d@�Z+dAdB�Z,dCdD�Z-dEdF�Z.dGdH�Z/dIdJ�Z0dKdL�Z1dMdN�Z2dOdP�Z3dQdR�Z4dSdT�Z5dUdV�Z6dWdX�Z7dYdZ�Z8d[d\�Z9d]d]d]d^�d_d`�Z:e;dadb��Z<�Z=S)jrz�
        \[                                 # [
        (?P<header>[^]]+)                  # very permissive!
        \]                                 # ]
        a�
        (?P<option>.*?)                    # very permissive!
        \s*(?P<vi>{delim})\s*              # any number of space/tab,
                                           # followed by any of the
                                           # allowed delimiters,
                                           # followed by any space/tab
        (?P<value>.*)$                     # everything up to eol
        a�
        (?P<option>.*?)                    # very permissive!
        \s*(?:                             # any number of space/tab,
        (?P<vi>{delim})\s*                 # optionally followed by
                                           # any of the allowed
                                           # delimiters, followed by any
                                           # space/tab
        (?P<value>.*))?$                   # everything up to eol
        z=|:)�delimz\STF)�1Zyes�trueZon�0�noZfalseZoffN)�=rg)�#�;)�
delimiters�comment_prefixes�inline_comment_prefixes�strict�empty_lines_in_values�default_section�
interpolation�
convertersc
Cs<||_|��|_|��|_t|�|_|��|_t||	�|j|	<t|�|_|dkrd|rZ|j	n|j
|_nNd�dd�|D��}|r�t
�|jj|d�t
j�|_nt
�|jj|d�t
j�|_t|p�d�|_t|p�d�|_||_||_||_|	|_|
|_|jtkr�|j|_|jdk�rt�|_|tk	�r(|j�|�|�r8|�|�dS)N)rzrg�|css|]}t�|�VqdS)N)rc�escape)�.0�dr"r"r#�	<genexpr>isz+RawConfigParser.__init__.<locals>.<genexpr>)rur")�_dict�	_sections�	_defaultsr�_converters�_proxiesr�tuple�_delimiters�	OPTCRE_NV�OPTCRE�_optcrer0rcrd�_OPT_NV_TMPLr-�VERBOSE�	_OPT_TMPL�_comment_prefixes�_inline_comment_prefixes�_strict�_allow_no_value�_empty_lines_in_valuesr��_interpolation�_UNSET�_DEFAULT_INTERPOLATIONr�update�_read_defaults)
r rCZ	dict_typeZallow_no_valuer}r~rr�r�r�r�r�r�r"r"r#rXs<







zRawConfigParser.__init__cCs|jS)N)r�)r r"r"r#rC�szRawConfigParser.defaultscCst|j���S)N)�listr��keys)r r"r"r#�sections�szRawConfigParser.sectionscCsJ||jkrtd|��||jkr(t|��|��|j|<t||�|j|<dS)NzInvalid section name: %r)r�r6r�rr�rr�)r r)r"r"r#�add_section�s

zRawConfigParser.add_sectioncCs
||jkS)N)r�)r r)r"r"r#�has_section�szRawConfigParser.has_sectioncCsJy|j|��}Wntk
r0t|�d�YnX|�|j�t|���S)N)r��copyrYrr�r�r�r�)r r)Zoptsr"r"r#�options�szRawConfigParser.optionsc
Cs�t|tttjf�r|g}g}xl|D]d}y(t||d��}|�||�WdQRXWntk
rdw"YnXt|tj�r|t�|�}|�	|�q"W|S)N)�encoding)
�
isinstance�str�bytes�os�PathLike�open�_read�OSError�fspathr,)r �	filenamesr�Zread_okr8�fpr"r"r#�read�s

zRawConfigParser.readcCs<|dkr,y
|j}Wntk
r*d}YnX|�||�dS)Nz<???>)�name�AttributeErrorr�)r �fr1r"r"r#�	read_file�s

zRawConfigParser.read_file�<string>cCst�|�}|�||�dS)N)�io�StringIOr�)r �stringr1Zsfiler"r"r#�read_string�s
zRawConfigParser.read_string�<dict>c
Cs�t�}x�|��D]�\}}t|�}y|�|�Wn(ttfk
rV|jrR||krR�YnX|�|�xl|��D]`\}}|�t|��}|dk	r�t|�}|jr�||f|kr�t	|||��|�||f�|�|||�qlWqWdS)N)
�setrkr�r�rr6r��addrVr)r Z
dictionaryr1�elements_addedr)r��keyr>r"r"r#�	read_dict�s"

zRawConfigParser.read_dictcCs"tjdtdd�|j||d�dS)NzRThis method will be removed in future versions.  Use 'parser.read_file()' instead.r9)r:)r1)r;r<r=r�)r r�r8r"r"r#�readfp�s
zRawConfigParser.readfp)rQrqrRcCs�y|�||�}Wn$tk
r4|tkr,�n|SYnX|�|�}y||}Wn,tk
rx|tkrpt||��n|SYnX|s�|dkr�|S|j�|||||�SdS)N)�
_unify_valuesrr�rVrYrr�rD)r r)r3rQrqrRr�r>r"r"r#rT�s"


zRawConfigParser.getcKs||j||f|��S)N)rT)r r)�convr3�kwargsr"r"r#�_get!szRawConfigParser._getc	KsDy|j|||f||d�|��Sttfk
r>|tkr:�|SXdS)N)rQrq)r�rrr�)r r)r3r�rQrqrRr�r"r"r#�	_get_conv$szRawConfigParser._get_convcKs|j||tf|||d�|��S)N)rQrqrR)r��int)r r)r3rQrqrRr�r"r"r#�getint/szRawConfigParser.getintcKs|j||tf|||d�|��S)N)rQrqrR)r��float)r r)r3rQrqrRr�r"r"r#�getfloat4szRawConfigParser.getfloatcKs |j|||jf|||d�|��S)N)rQrqrR)r��_convert_to_boolean)r r)r3rQrqrRr�r"r"r#�
getboolean9szRawConfigParser.getbooleancs��tkrt���S�j���y���j��Wn&tk
rV��jkrRt	���YnX|r�x"|��D]\}}|���
|�<qfW���fdd��|r��fdd���fdd����D�S)Ncs�j���|�|��S)N)r�rD)r3)r�r)r r"r#�<lambda>Usz'RawConfigParser.items.<locals>.<lambda>cs�|S)Nr")r3)r�r"r#r�X�csg|]}|�|�f�qSr"r")r�r3)�value_getterr"r#�
<listcomp>Ysz)RawConfigParser.items.<locals>.<listcomp>)r��superrkr�r�r�r�rYr�rrVr�)r r)rQrqr�r>)�	__class__)r�r)r r�r#rk>s


zRawConfigParser.itemscCs.x$|��D]}||}||=||fSWt�dS)N)r�rY)r r�r>r"r"r#�popitem[s

zRawConfigParser.popitemcCs|��S)N)�lower)r Z	optionstrr"r"r#rVhszRawConfigParser.optionxformcCsV|r||jkr"|�|�}||jkS||jkr0dS|�|�}||j|kpP||jkSdS)NF)r�rVr�r�)r r)r3r"r"r#�
has_optionks



zRawConfigParser.has_optioncCsl|r|j�||||�}|r$||jkr,|j}n.y|j|}Wntk
rXt|�d�YnX|||�|�<dS)N)r�rEr�r�r�rYrrV)r r)r3r>�sectdictr"r"r#r�yszRawConfigParser.setcCsl|rd�|jd�}n
|jd}|jr>|�||j|j��|�x(|jD]}|�|||j|��|�qFWdS)Nz {} r)r-r�r��_write_sectionr�rkr�)r r�Zspace_around_delimitersr�r)r"r"r#�write�s

zRawConfigParser.writecCs||�d�|��x\|D]T\}}|j�||||�}|dk	s>|jsT|t|��dd�}nd}|�d�||��qW|�d�dS)Nz[{}]
�
z
	rz{}{}
)r�r-r�rGr�r�rL)r r�Zsection_nameZ
section_itemsZ	delimiterr�r>r"r"r#r��szRawConfigParser._write_sectioncCsd|r||jkr|j}n.y|j|}Wntk
rBt|�d�YnX|�|�}||k}|r`||=|S)N)r�r�r�rYrrV)r r)r3r��existedr"r"r#�
remove_option�s
zRawConfigParser.remove_optioncCs"||jk}|r|j|=|j|=|S)N)r�r�)r r)r�r"r"r#�remove_section�s

zRawConfigParser.remove_sectioncCs&||jkr|�|�st|��|j|S)N)r�r�rYr�)r r�r"r"r#�__getitem__�szRawConfigParser.__getitem__cCs@||jkr|j��n||jkr.|j|��|�||i�dS)N)r�r��clearr�r�)r r�r>r"r"r#�__setitem__�s


zRawConfigParser.__setitem__cCs2||jkrtd��|�|�s$t|��|�|�dS)Nz"Cannot remove the default section.)r�r6r�rYr�)r r�r"r"r#�__delitem__�s


zRawConfigParser.__delitem__cCs||jkp|�|�S)N)r�r�)r r�r"r"r#�__contains__�szRawConfigParser.__contains__cCst|j�dS)NrH)rir�)r r"r"r#�__len__�szRawConfigParser.__len__cCst�|jf|j���S)N)�	itertools�chainr�r�r�)r r"r"r#�__iter__�szRawConfigParser.__iter__cCs0t�}d}d}d}d}d}d}	�x�t|dd�D�]�\}}
tj}dd�|jD�}x||tjkr�|r�i}
x`|��D]T\}}|
�||d�}|dkr�ql||
|<|dks�|dkrl|
|d��rlt||�}qlW|
}qPWx"|j	D]}|
�
��|�r�d}Pq�W|tjkr�d}|
d|��
�}|�s\|j�rT|dk�rZ|dk	�rZ|�rZ||dk	�rZ||�
d�q.tj}q.|j�|
�}|�rv|��nd}|dk	�r�|�r�||k�r�||�
|�q.|}|j�|�}|�rJ|�d�}||jk�r|j�r�||k�r�t|||��|j|}|�|�n@||jk�r|j}n,|��}||j|<t||�|j|<|�|�d}q.|dk�rbt|||
��q.|j�|�}|�r|�d	d
d�\}}}|�s�|�|	|||
�}	|� |�!��}|j�r�||f|k�r�t"||||��|�||f�|dk	�r�|�
�}|g||<nd||<q.|�|	|||
�}	q.W|�#�|	�r,|	�dS)NrrH)�startcSsi|]
}d|�qS)���r")r�r^r"r"r#�
<dictcomp>�sz)RawConfigParser._read.<locals>.<dictcomp>r�r�headerr3�vir>)$r��	enumerate�sys�maxsizer�rkrO�isspace�minr��strip�
startswithr�r,�NONSPACECRE�searchr��SECTCRErUrWr�r�rr�r�r�r�rr�rr��
_handle_errorrV�rstripr�_join_multiline_values)r r��fpnamer�ZcursectZsectnameZoptnamer2Zindent_levelrrr?Z
comment_startZinline_prefixesZ
next_prefixes�prefix�indexr>Zfirst_nonspaceZcur_indent_level�mor�Zoptvalr"r"r#r��s� 










zRawConfigParser._readcCsz|j|jf}t�|f|j���}xT|D]L\}}xB|��D]6\}}t|t�rXd�|��	�}|j
�||||�||<q8Wq&WdS)Nr�)r�r�r�r�r�rkr�r�r0r�r�rF)r rCZall_sectionsr)r�r��valr"r"r#r�Xs
z&RawConfigParser._join_multiline_valuescCs*x$|��D]\}}||j|�|�<q
WdS)N)rkr�rV)r rCr�r>r"r"r#r�dszRawConfigParser._read_defaultscCs |st|�}|�|t|��|S)N)r
r,r+)r �excr�r2r?r"r"r#r�jszRawConfigParser._handle_errorcCs�i}y|j|}Wn(tk
r:||jkr6t|�d�YnXi}|rxx2|��D]&\}}|dk	rft|�}|||�|�<qNWt|||j�S)N)	r�rYr�rrkr�rV�	_ChainMapr�)r r)rqZsectiondictZvardictr�r>r"r"r#r�ps
zRawConfigParser._unify_valuescCs(|��|jkrtd|��|j|��S)NzNot a boolean: %s)r��BOOLEAN_STATESr6)r r>r"r"r#r��sz#RawConfigParser._convert_to_booleanr)r)r3r>cCsDt|t�std��t|t�s$td��|jr.|r@t|t�s@td��dS)Nzsection names must be stringszoption keys must be stringszoption values must be strings)r�r��	TypeErrorr�)r r)r3r>r"r"r#�_validate_value_types�s



z%RawConfigParser._validate_value_typescCs|jS)N)r�)r r"r"r#r��szRawConfigParser.converters)N)N)r�)r�)N)N)T)>r%r&r'Z
_SECT_TMPLr�r�rr�rcrdr�r�r-r�r�r�r�
_default_dictrr�rrCr�r�r�r�r�r�r�r�r�rTr�r�r�r�r�rkr�rVr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr@r��
__classcell__r"r")r�r#r/sv	
#	




	%




zcs8eZdZe�Zd�fdd�	Z�fdd�Zdd�Z�ZS)	rNcs"|j||d�t��|||�dS)N)r3r>)rr�r�)r r)r3r>)r�r"r#r��szConfigParser.setcs|j|d�t��|�dS)N)r))rr�r�)r r))r�r"r#r��szConfigParser.add_sectioncCs0z"|j}t�|_|�|j|i�Wd||_XdS)N)r�rr�r�)r rCZhold_interpolationr"r"r#r��s
zConfigParser._read_defaults)N)	r%r&r'rr�r�r�r�rr"r")r�r#r�scseZdZ�fdd�Z�ZS)rcs"t�j||�tjdtdd�dS)Nz�The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.r9)r:)r�rr;r<r=)r r*r�)r�r"r#r�szSafeConfigParser.__init__)r%r&r'rrr"r")r�r#r�sc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zedd��Z
edd��Zddddd�dd�ZdS)rcCsJ||_||_x8|jD].}d|}tj|jt||�d�}t|||�qWdS)NrT)�_impl)�_parser�_namer�rnrorT�getattr�setattr)r rBr�r�r��getterr"r"r#r�szSectionProxy.__init__cCsd�|j�S)Nz
<Section: {}>)r-r	)r r"r"r#r$�szSectionProxy.__repr__cCs(|j�|j|�st|��|j�|j|�S)N)rr�r	rYrT)r r�r"r"r#r��szSectionProxy.__getitem__cCs"|jj||d�|j�|j||�S)N)r3r>)rrr�r	)r r�r>r"r"r#r��szSectionProxy.__setitem__cCs,|j�|j|�r |j�|j|�s(t|��dS)N)rr�r	r�rY)r r�r"r"r#r��szSectionProxy.__delitem__cCs|j�|j|�S)N)rr�r	)r r�r"r"r#r��szSectionProxy.__contains__cCst|���S)N)ri�_options)r r"r"r#r��szSectionProxy.__len__cCs|����S)N)r
r�)r r"r"r#r��szSectionProxy.__iter__cCs*|j|jjkr|j�|j�S|j��SdS)N)r	rr�r�rC)r r"r"r#r
�szSectionProxy._optionscCs|jS)N)r)r r"r"r#rB�szSectionProxy.parsercCs|jS)N)r	)r r"r"r#r�szSectionProxy.nameNF)rQrqrcKs(|s|jj}||j|f|||d�|��S)N)rQrqrR)rrTr	)r r3rRrQrqrr�r"r"r#rTs
zSectionProxy.get)N)r%r&r'rr$r�r�r�r�r�r�r
r@rBr�rTr"r"r"r#r�s	c@sFeZdZe�d�Zdd�Zdd�Zdd�Zdd	�Z	d
d�Z
dd
�ZdS)rz^get(?P<name>.+)$cCsV||_i|_xDt|j�D]6}|j�|�}|rtt|j|��s>qd|j|�d�<qWdS)Nr�)r�_data�dir�	GETTERCRErU�callabler
rW)r rBrr`r"r"r#r"szConverterMapping.__init__cCs
|j|S)N)r)r r�r"r"r#r�+szConverterMapping.__getitem__c	Cs�yd|}Wn(tk
r4td�|t|����YnX|dkrFtd��||j|<tj|jj|d�}||_	t
|j||�x.|j��D] }tj|j|d�}t
|||�q�WdS)NrTzIncompatible key: {} (type: {})z)Incompatible key: cannot use "" as a name)r�)r)
rr6r-�typerrnrorr�Z	converterr�valuesrT)r r�r>�k�func�proxyrr"r"r#r�.s
zConverterMapping.__setitem__c	Cs�yd|p
d}Wntk
r,t|��YnX|j|=xDt�|jf|j���D]*}yt||�WqNtk
rvwNYqNXqNWdS)NrT)	rrYrr�r�rr�delattrr�)r r�r�instr"r"r#r�>szConverterMapping.__delitem__cCs
t|j�S)N)�iterr)r r"r"r#r�LszConverterMapping.__iter__cCs
t|j�S)N)rir)r r"r"r#r�OszConverterMapping.__len__N)r%r&r'rcrdrrr�r�r�r�r�r"r"r"r#rs
	)(Zcollections.abcr�collectionsrrrrrnr�r�r�rcr�r;�__all__rrrrrrrrr	rrr
r
r�objectr�rrrrrrrrrr"r"r"r#�<module>�sV
	

+HJ&z 
F