Current File : //proc/self/root/usr/lib/python3.12/__pycache__/configparser.cpython-312.pyc
�

�4h����dZddlmZddlmZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZdZ
eZdZdZGd�d	e�ZGd
�de�ZGd�d
e�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Ze�ZGd�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,�d-e�Z'y).a�Configuration file parser.

A configuration file consists of sections, lead by a "[section]" header,
and followed by "name: value" entries, with continuations and such in
the style of RFC 822.

Intrinsic defaults can be specified by passing them into the
ConfigParser constructor as a dictionary.

class:

ConfigParser -- responsible for parsing a list of
                    configuration files, and managing the parsed database.

    methods:

    __init__(defaults=None, dict_type=_default_dict, allow_no_value=False,
             delimiters=('=', ':'), comment_prefixes=('#', ';'),
             inline_comment_prefixes=None, strict=True,
             empty_lines_in_values=True, default_section='DEFAULT',
             interpolation=<unset>, converters=<unset>):

        Create the parser. When `defaults` is given, it is initialized into the
        dictionary or intrinsic defaults. The keys must be strings, the values
        must be appropriate for %()s string interpolation.

        When `dict_type` is given, it will be used to create the dictionary
        objects for the list of sections, for the options within a section, and
        for the default values.

        When `delimiters` is given, it will be used as the set of substrings
        that divide keys from values.

        When `comment_prefixes` is given, it will be used as the set of
        substrings that prefix comments in empty lines. Comments can be
        indented.

        When `inline_comment_prefixes` is given, it will be used as the set of
        substrings that prefix comments in non-empty lines.

        When `strict` is True, the parser won't allow for any section or option
        duplicates while reading from a single source (file, string or
        dictionary). Default is True.

        When `empty_lines_in_values` is False (default: True), each empty line
        marks the end of an option. Otherwise, internal empty lines of
        a multiline option are kept as part of the value.

        When `allow_no_value` is True (default: False), options without
        values are accepted; the value presented for these is None.

        When `default_section` is given, the name of the special section is
        named accordingly. By default it is called ``"DEFAULT"`` but this can
        be customized to point to any other valid section name. Its current
        value can be retrieved using the ``parser_instance.default_section``
        attribute and may be modified at runtime.

        When `interpolation` is given, it should be an Interpolation subclass
        instance. It will be used as the handler for option value
        pre-processing when using getters. RawConfigParser objects don't do
        any sort of interpolation, whereas ConfigParser uses an instance of
        BasicInterpolation. The library also provides a ``zc.buildout``
        inspired ExtendedInterpolation implementation.

        When `converters` is given, it should be a dictionary where each key
        represents the name of a type converter and each value is a callable
        implementing the conversion from string to the desired datatype. Every
        converter gets its corresponding get*() method on the parser object and
        section proxies.

    sections()
        Return all the configuration section names, sans DEFAULT.

    has_section(section)
        Return whether the given section exists.

    has_option(section, option)
        Return whether the given option exists in the given section.

    options(section)
        Return list of configuration options for the named section.

    read(filenames, encoding=None)
        Read and parse the iterable of named configuration files, given by
        name.  A single filename is also allowed.  Non-existing files
        are ignored.  Return list of successfully read files.

    read_file(f, filename=None)
        Read and parse one configuration file, given as a file object.
        The filename defaults to f.name; it is only used in error
        messages (if f has no `name` attribute, the string `<???>` is used).

    read_string(string)
        Read configuration from a given string.

    read_dict(dictionary)
        Read configuration from a dictionary. Keys are section names,
        values are dictionaries with keys and values that should be present
        in the section. If the used dictionary type preserves order, sections
        and their keys will be added in order. Values are automatically
        converted to strings.

    get(section, option, raw=False, vars=None, fallback=_UNSET)
        Return a string value for the named option.  All % interpolations are
        expanded in the return values, based on the defaults passed into the
        constructor and the DEFAULT section.  Additional substitutions may be
        provided using the `vars` argument, which must be a dictionary whose
        contents override any pre-existing defaults. If `option` is a key in
        `vars`, the value from `vars` is used.

    getint(section, options, raw=False, vars=None, fallback=_UNSET)
        Like get(), but convert value to an integer.

    getfloat(section, options, raw=False, vars=None, fallback=_UNSET)
        Like get(), but convert value to a float.

    getboolean(section, options, raw=False, vars=None, fallback=_UNSET)
        Like get(), but convert value to a boolean (currently case
        insensitively defined as 0, false, no, off for False, and 1, true,
        yes, on for True).  Returns False or True.

    items(section=_UNSET, raw=False, vars=None)
        If section is given, return a list of tuples with (name, value) for
        each option in the section. Otherwise, return a list of tuples with
        (section_name, section_proxy) for each section, including DEFAULTSECT.

    remove_section(section)
        Remove the given file section and all its options.

    remove_option(section, option)
        Remove the given option from the given section.

    set(section, option, value)
        Set the given option.

    write(fp, space_around_delimiters=True)
        Write the configuration state in .ini format. If
        `space_around_delimiters` is True (the default), delimiters
        between keys and values are surrounded by spaces.
�)�MutableMapping)�ChainMapN)�NoSectionError�DuplicateOptionError�DuplicateSectionError�
NoOptionError�InterpolationError�InterpolationDepthError�InterpolationMissingOptionError�InterpolationSyntaxError�ParsingError�MissingSectionHeaderError�ConfigParser�RawConfigParser�
Interpolation�BasicInterpolation�ExtendedInterpolation�LegacyInterpolation�SectionProxy�ConverterMapping�DEFAULTSECT�MAX_INTERPOLATION_DEPTH�DEFAULT�
c�"�eZdZdZdd�Zd�ZeZy)�Errorz'Base class for ConfigParser exceptions.c�>�||_tj||�y�N)�message�	Exception�__init__)�self�msgs  �#/usr/lib/python3.12/configparser.pyr!zError.__init__�s��������4��%�c��|jSr)r�r"s r$�__repr__zError.__repr__�s���|�|�r%N)�)�__name__�
__module__�__qualname__�__doc__r!r(�__str__�r%r$rr�s��1�&���Gr%rc��eZdZdZd�Zy)rz2Raised when no section matches a requested option.c�T�tj|d|���||_|f|_y)NzNo section: )rr!�section�args�r"r2s  r$r!zNoSectionError.__init__�s#��
���t��:�;�����K��	r%N�r*r+r,r-r!r/r%r$rr�s
��<� r%rc��eZdZdZdd�Zy)raRaised when a section is repeated in an input source.

    Possible repetitions that raise this exception are: multiple creation
    using the API or in strict parsers when a section is found more than once
    in a single input file, string or dictionary.
    Nc�v�t|�dg}|�Tdt|�g}|� |jdj|��|jd�|j|�|}n|j	dd�t
j
|dj|��||_||_	||_
|||f|_y)N� already exists�While reading from � [line {0:2d}]z
: section rzSection r))�repr�append�format�extend�insertrr!�joinr2�source�linenor3)r"r2rArBr#rs      r$r!zDuplicateSectionError.__init__�s����G�}�/�0����,�d�6�l�;�G��!����/�6�6�v�>�?��N�N�<�(��N�N�3���C��J�J�q�*�%�
���t�R�W�W�S�\�*�����������f�f�-��	r%�NNr5r/r%r$rr�s���.r%rc��eZdZdZdd�Zy)rz�Raised by strict parsers when an option is repeated in an input source.

    Current implementation raises this exception only when an option is found
    more than once in a single file, string or dictionary.
    Nc��t|�dt|�dg}|�Tdt|�g}|� |jdj|��|jd�|j|�|}n|j	dd�t
j
|dj|��||_||_	||_
||_||||f|_y)	Nz in section r8r9r:z	: option rzOption r))
r;r<r=r>r?rr!r@r2�optionrArBr3)r"r2rFrArBr#rs       r$r!zDuplicateOptionError.__init__�s����F�|�^�T�'�]� �"����,�d�6�l�;�G��!����/�6�6�v�>�?��N�N�;�'��N�N�3���C��J�J�q�)�$�
���t�R�W�W�S�\�*��������������f�f�f�5��	r%rCr5r/r%r$rr�s���6r%rc��eZdZdZd�Zy)rz!A requested option was not found.c�j�tj|d|�d|���||_||_||f|_y)Nz
No option z
 in section: �rr!rFr2r3)r"rFr2s   r$r!zNoOptionError.__init__�s4��
���t���)�	*��������W�%��	r%Nr5r/r%r$rr�s
��+�&r%rc��eZdZdZd�Zy)r	z0Base class for interpolation-related exceptions.c�`�tj||�||_||_|||f|_yrrI)r"rFr2r#s    r$r!zInterpolationError.__init__s,��
���t�S�!��������W�c�*��	r%Nr5r/r%r$r	r	�s
��:�+r%r	c��eZdZdZd�Zy)rzAA string substitution required a setting which was not available.c��dj||||�}tj||||�||_||||f|_y)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!�	referencer3)r"rFr2�rawvalrNr#s      r$r!z(InterpolationMissingOptionError.__init__sI��!�!'�����F�!K�	�	�#�#�D�&�'�3�?�"����W�f�i�8��	r%Nr5r/r%r$rr	s
��K�9r%rc��eZdZdZy)rz�Raised when the source text contains invalid syntax.

    Current implementation raises this exception when the source text into
    which substitutions are made does not conform to the required syntax.
    N)r*r+r,r-r/r%r$rrs��r%rc��eZdZdZd�Zy)r
z0Raised when substitutions are nested too deeply.c�x�dj||t|�}tj||||�|||f|_y)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	r!r3)r"rFr2rOr#s     r$r!z InterpolationDepthError.__init__ sF����&���*A��!�	�
	�#�#�D�&�'�3�?��W�f�-��	r%Nr5r/r%r$r
r
s
��:�.r%r
c�(��eZdZdZ�fd�Zd�Z�xZS)r
z>Raised when a configuration file does not follow legal syntax.c�V��t�|�d|���||_g|_|f|_y)Nz Source contains parsing errors: )�superr!rA�errorsr3)r"rA�	__class__s  �r$r!zParsingError.__init__-s/���
���;�F�:�F�G��������J��	r%c�r�|jj||f�|xjd||fzz
c_y)Nz
	[line %2d]: %s)rVr<r)r"rB�lines   r$r<zParsingError.append3s0�������F�D�>�*����,���~�=�=�r%)r*r+r,r-r!r<�
__classcell__�rWs@r$r
r
*s���H��>r%r
c��eZdZdZd�Zy)rz@Raised when a key-value pair is found before any section header.c�z�tj|d|||fz�||_||_||_|||f|_y)Nz7File contains no section headers.
file: %r, line: %d
%r)rr!rArBrYr3)r"�filenamerBrYs    r$r!z"MissingSectionHeaderError.__init__;sH��
����G�
�v�t�$�
%�	&���������	��v�t�,��	r%Nr5r/r%r$rr8s
��J�-r%rc�(�eZdZdZd�Zd�Zd�Zd�Zy)rzBDummy interpolation that passes the value through with no changes.c��|Srr/)r"�parserr2rF�value�defaultss      r$�
before_getzInterpolation.before_getO����r%c��|Srr/�r"rar2rFrbs     r$�
before_setzInterpolation.before_setRrer%c��|Srr/rgs     r$�before_readzInterpolation.before_readUrer%c��|Srr/rgs     r$�before_writezInterpolation.before_writeXrer%N)r*r+r,r-rdrhrjrlr/r%r$rrLs��L����r%rc�F�eZdZdZej
d�Zd�Zd�Zd�Z	y)ra!Interpolation as implemented in the classic ConfigParser.

    The option values can contain format strings which refer to other values in
    the same section, or values in the special default section.

    For example:

        something: %(dir)s/whatever

    would resolve the "%(dir)s" to the value of dir.  All reference
    expansions are done late, on demand. If a user needs to use a bare % in
    a configuration file, she can escape it by writing %%. Other % usage
    is considered a user error and raises `InterpolationSyntaxError`.z
%\(([^)]+)\)sc	�V�g}|j||||||d�dj|�S�N�r)��_interpolate_somer@�r"rar2rFrbrc�Ls       r$rdzBasicInterpolation.before_getm�/�������v�v�q�%��(�A�N��w�w�q�z�r%c��|jdd�}|jjd|�}d|vrtd||j	d�fz��|S)Nz%%r)�%�1invalid interpolation syntax in %r at position %d��replace�_KEYCRE�sub�
ValueError�find�r"rar2rFrb�	tmp_values      r$rhzBasicInterpolation.before_setr�`���M�M�$��+�	��L�L�$�$�R��3�	��)���+�.3�Y�^�^�C�5H�-I�J�K�
K��r%c
���|j||d|��}|tkDr
t|||��|�r|jd�}	|	dkr|j	|�y|	dkDr|j	|d|	�||	d}|dd}
|
dk(r|j	d�|dd}n�|
dk(r�|j
j
|�}|�t||d|z��|j|jd��}||j�d}	||}
d|
vr|j||||
|||dz�n"|j	|
�nt||d	|����|r��yy#t$rt||||�d�wxYw)
NT��raw�fallbackrwrrp��(�'bad interpolation variable reference %rz+'%' must be followed by '%' or '(', found: )�getrr
r~r<r{�matchr�optionxform�group�end�KeyErrorrrr)r"rarF�accum�restr2�map�depthrO�p�c�m�var�vs              r$rrz$BasicInterpolation._interpolate_somezs������G�V����E���*�*�)�&�'�6�B�B���	�	�#��A��1�u����T�"���1�u����T�"�1�X�&��A�B�x���Q�q�	�A��C�x����S�!��A�B�x���c���L�L�&�&�t�,���9�2�6�7�A�D�H�J�J��(�(������4���A�E�E�G�H�~��@��C��A��!�8��*�*�6�6�5�!�+2�C����D��L�L��O�.��G�#'�*�+�+�?��, �@�9�����6�;?�@�@�s�<E�E!N�
r*r+r,r-�re�compiler{rdrhrrr/r%r$rr\s*��I��b�j�j�)�*�G��
�'+r%rc�F�eZdZdZej
d�Zd�Zd�Zd�Z	y)rzyAdvanced variant of interpolation, supports the syntax used by
    `zc.buildout`. Enables interpolation between sections.z
\$\{([^}]+)\}c	�V�g}|j||||||d�dj|�Srorqrss       r$rdz ExtendedInterpolation.before_get�rur%c��|jdd�}|jjd|�}d|vrtd||j	d�fz��|S)Nz$$r)�$rxryrs      r$rhz ExtendedInterpolation.before_set�r�r%c
��|j||d|��}|tkDr
t|||��|�r�|jd�}	|	dkr|j	|�y|	dkDr|j	|d|	�||	d}|dd}
|
dk(r|j	d�|dd}�n:|
dk(�r$|j
j
|�}|�t||d|z��|jd�jd	�}||j�d}|}
|}	t|�dk(r|j|d�}||}nLt|�dk(r.|d}
|j|d�}|j|
|d�
�}nt||d|����d|vr5|j%|||||
t'|j)|
d�
��|dz�n"|j	|�nt||d|����|r���yy#tttf$rt!|||d	j#|��d�wxYw)
NTr�r�rrpr��{r��:)r�zMore than one ':' found: z+'$' must be followed by '$' or '{', found: )r�rr
r~r<r{r�rr��splitr��lenr�r�rrrr@rr�dict�items)r"rarFr�r�r2r�r�rOr�r�r��path�sect�optr�s                r$rrz'ExtendedInterpolation._interpolate_some�s=�����G�V����E���*�*�)�&�'�6�B�B���	�	�#��A��1�u����T�"���1�u����T�"�1�X�&��A�B�x���Q�q�	�A��C�x����S�!��A�B�x���c���L�L�&�&�t�,���9�2�6�7�A�D�H�J�J��w�w�q�z�'�'��,���A�E�E�G�H�~������K��4�y�A�~�$�0�0��a��9����H���T��a��#�A�w��$�0�0��a��9��"�J�J�t�S�d�J�;��6�"�G�=A�C�E�E��!�8��*�*�6�3��q�$�+/����T�t��0L�+M�+0�1�9�6��L�L��O�.��G�#'�*�+�+�Y��D!�.�-�@�K�9�������$��A�FJ�K�K�s
�A4G�3H
Nr�r/r%r$rr�s)��>��b�j�j�)�*�G��
�4+r%rc�b��eZdZdZej
d�Z�fd�Zd�Zd�Z	e
d��Z�xZS)rz{Deprecated interpolation used in old versions of ConfigParser.
    Use BasicInterpolation or ExtendedInterpolation instead.z%\(([^)]*)\)s|.c�\��t�|�|i|��tjdtd��y)Nz�LegacyInterpolation has been deprecated since Python 3.2 and will be removed from the configparser module in Python 3.13. Use BasicInterpolation or ExtendedInterpolation instead.r�)�
stacklevel)rUr!�warnings�warn�DeprecationWarning)r"r3�kwargsrWs   �r$r!zLegacyInterpolation.__init__�s.���
���$�)�&�)��
�
�
G�
�1�		
r%c�@�|}t}|rS|dz}|rHd|vrDtj|j|��}|jj||�}	||z}nn|r�S|rd|vr
t|||��|S#t$r!}	t||||	jd�d�d}	~	wwxYw)Nrpz%()rar)
r�	functools�partial�_interpolation_replacer{r|r�rr3r
)
r"rar2rFrb�varsrOr�rz�es
          r$rdzLegacyInterpolation.before_get�s�����'����Q�J�E�����#�+�+�D�,G�,G�39�;�����(�(��%�8��F�!�D�L�E�
���T�U�]�)�&�'�6�B�B���� �F�9���������<�AE�F��F�s�A3�3	B�<B�Bc��|Srr/rgs     r$rhzLegacyInterpolation.before_setrer%c�p�|jd�}|�|j�Sd|j|�zS)Nrpz%%(%s)s)r�r�)r�ra�ss   r$r�z*LegacyInterpolation._interpolation_replaces6���K�K��N���9��;�;�=� ��v�1�1�!�4�4�4r%)
r*r+r,r-r�r�r{r!rdrh�staticmethodr�rZr[s@r$rr�s?���@��b�j�j�+�,�G�
��(��5��5r%rc
���eZdZdZdZdZdZe�Ze	jee	j�Ze	jejd��e	j�Ze	jejd��e	j�Ze	jd�Zddddd	d	d	d	d
�Zded	fdd
dddeeed�d�Zd�Zd�Zd�Zd�Zd�Zd9d�Zd9d�Zd:d�Zd;d�Zd	ded�d�Zd�Z d	ded�d�Z!d	ded�d�Z"d	ded�d�Z#d	ded�d�Z$ed	df�fd �	Z%d!�Z&d"�Z'd#�Z(d9d$�Z)d<d%�Z*d&�Z+d'�Z,d(�Z-d)�Z.d*�Z/d+�Z0d,�Z1d-�Z2d.�Z3d/�Z4d0�Z5d1�Z6d2�Z7d3�Z8d4�Z9d5d5d5d6�d7�Z:e;d8��Z<�xZ=S)=rz,ConfigParser that does not do interpolation.z�
        \[                                 # [
        (?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)�1�yes�true�on�0�no�false�offN��=r�)�#�;)�
delimiters�comment_prefixes�inline_comment_prefixes�strict�empty_lines_in_values�default_section�
interpolation�
convertersc��||_|j�|_|j�|_t|�|_|j�|_t
||	�|j
|	<t|�|_|dk(r |r|jn|j|_n�djd�|D��}|rDtj|jj!|��tj"�|_nCtj|j$j!|��tj"�|_t|xsd�|_t|xsd�|_||_||_||_|	|_|
|_|j2t4ur|j6|_|j2�t9�|_t;|j2t8�s!t=dt?|j2�����|t4ur|jjA|�|r|jC|�yy)Nr��|c3�FK�|]}tj|����y�wr)r��escape)�.0�ds  r$�	<genexpr>z+RawConfigParser.__init__.<locals>.<genexpr>Ws����:�!����1��:�s�!r�r/zSinterpolation= must be None or an instance of Interpolation; got an object of type )"�_dict�	_sections�	_defaultsr�_converters�_proxiesr�tuple�_delimiters�	OPTCRE_NV�OPTCRE�_optcrer@r�r��_OPT_NV_TMPLr=�VERBOSE�	_OPT_TMPL�_comment_prefixes�_inline_comment_prefixes�_strict�_allow_no_value�_empty_lines_in_valuesr��_interpolation�_UNSET�_DEFAULT_INTERPOLATIONr�
isinstance�	TypeError�type�update�_read_defaults)
r"rc�	dict_type�allow_no_valuer�r�r�r�r�r�r�r�r�s
             r$r!zRawConfigParser.__init__Fs�����
�������������+�D�1����
�
���
�)5�d�O�)L��
�
�o�&� ��,�����#�-;�4�>�>����D�L����:�z�:�:�A��!�z�z�$�*;�*;�*B�*B��*B�*K�*,�*�*� 6��� "�z�z�$�.�.�*?�*?�a�*?�*H�*,�*�*� 6���!&�'7�'=�2�!>���(-�.E�.K��(L��%����-���&;��#�,���+������&�(�"&�"=�"=�D�����&�"/�/�D���$�-�-�}�=��*�*.�t�/B�/B�*C�)D�F��
��V�#����#�#�J�/������)�r%c��|jSr)r�r's r$rczRawConfigParser.defaultsss���~�~�r%c�H�t|jj��S)z3Return a list of section names, excluding [DEFAULT])�listr��keysr's r$�sectionszRawConfigParser.sectionsvs���D�N�N�'�'�)�*�*r%c���||jk(rtd|z��||jvrt|��|j	�|j|<t||�|j|<y)z�Create a new section in the configuration.

        Raise DuplicateSectionError if a section by the specified name
        already exists. Raise ValueError if name is DEFAULT.
        zInvalid section name: %rN)r�r}r�rr�rr�r4s  r$�add_sectionzRawConfigParser.add_section{sc���d�*�*�*��7�'�A�B�B��d�n�n�$�'��0�0�"&�*�*�,����w��!-�d�G�!<��
�
�g�r%c��||jvS)z~Indicate whether the named section is present in the configuration.

        The DEFAULT section is not acknowledged.
        )r�r4s  r$�has_sectionzRawConfigParser.has_section�s��
�$�.�.�(�(r%c���	|j|j�}|j	|j
�t
|j��S#t$r
t|�d�wxYw)z9Return a list of option names for the given section name.N)r��copyr�rr�r�r�r�)r"r2�optss   r$�optionszRawConfigParser.options�s_��	4��>�>�'�*�/�/�1�D�	
���D�N�N�#��D�I�I�K� � ���	4� ��)�t�3�	4�s�A�A)c��t|tttjf�r|g}tj|�}g}|D]k}	t||��5}|j||�ddd�t|tj�rtj|�}|j|��m|S#1swY�MxYw#t$rY��wxYw)a�Read and parse a filename or an iterable of filenames.

        Files that cannot be opened are silently ignored; this is
        designed so that you can specify an iterable of potential
        configuration file locations (e.g. current directory, user's
        home directory, systemwide directory), and all existing
        configuration files in the iterable will be read.  A single
        filename may also be given.

        Return list of successfully read files.
        )�encodingN)r��str�bytes�os�PathLike�io�
text_encoding�open�_read�OSError�fspathr<)r"�	filenamesr�read_okr^�fps      r$�readzRawConfigParser.read�s����i�#�u�b�k�k�!:�;�"��I��#�#�H�-����!�	%�H�
��(�X�6�-�"��J�J�r�8�,�-��(�B�K�K�0��9�9�X�.���N�N�8�$�	%���-�-���
��
�s*�
B>�B2�&B>�2B;	�7B>�>	C
�	C
c�h�|�
	|j}|j||�y#t$rd}Y� wxYw)aPLike read() but the argument must be a file-like object.

        The `f` argument must be iterable, returning one line at a time.
        Optional second argument is the `source` specifying the name of the
        file being read. If not given, it is taken from f.name. If `f` has no
        `name` attribute, `<???>` is used.
        Nz<???>)�name�AttributeErrorr
)r"�frAs   r$�	read_filezRawConfigParser.read_file�s=���>�
!�����	
�
�
�1�f���"�
!� ��
!�s�#�1�1c�R�tj|�}|j||�y)z'Read configuration from a given string.N)r�StringIOr)r"�stringrA�sfiles    r$�read_stringzRawConfigParser.read_string�s�����F�#�����u�f�%r%c��t�}|j�D]�\}}t|�}	|j|�|j|�|j�D]q\}}|jt|��}|�t|�}|jr||f|vr
t|||��|j||f�|j|||��s��y#tt
f$r|jr||vr�Y��wxYw)aRead configuration from a dictionary.

        Keys are section names, values are dictionaries with keys and values
        that should be present in the section. If the used dictionary type
        preserves order, sections and their keys will be added in order.

        All types held in the dictionary are converted to strings during
        reading, including section names, option names and keys.

        Optional second argument is the `source` specifying the name of the
        dictionary being read.
        N)
�setr�rr�rr}r��addr�r)r"�
dictionaryrA�elements_addedr2r��keyrbs        r$�	read_dictzRawConfigParser.read_dict�s������'�-�-�/�	.�M�G�T��'�l�G�
�� � ��)�
���w�'�"�j�j�l�
.�
��U��&�&�s�3�x�0���$���J�E��<�<�W�c�N�n�$D�.�w��V�D�D��"�"�G�S�>�2�����#�u�-�
.�	.��*�:�6�
��<�<�G�~�$=���
�s�C� C9�8C9�r�r�r�c��	|j||�}|j|�}	||}|s|�|S|jj|||||�S#t$r|tur�|cYSwxYw#t$r|turt||��|cYSwxYw)a]Get an option value for a given section.

        If `vars` is provided, it must be a dictionary. The option is looked up
        in `vars` (if provided), `section`, and in `DEFAULTSECT` in that order.
        If the key is not found and `fallback` is provided, it is used as
        a fallback value. `None` can be provided as a `fallback` value.

        If interpolation is enabled and the optional argument `raw` is False,
        all interpolations are expanded in the return values.

        Arguments `raw`, `vars`, and `fallback` are keyword only.

        The section DEFAULT is special.
        )�
_unify_valuesrr�r�r�rr�rd)r"r2rFr�r�r�r�rbs        r$r�zRawConfigParser.get�s���	 ��"�"�7�D�1�A��!�!�&�)��	 ��f�I�E��%�-��L��&�&�1�1�$����23�5�
5��#�	 ��6�!����		 ���	 ��6�!�#�F�G�4�4���		 �s"�A�A*�A'�&A'�*B�Bc�6�||j||fi|���Sr)r�)r"r2�convrFr�s     r$�_getzRawConfigParser._gets���H�D�H�H�W�f�7��7�8�8r%c�t�	|j|||f||d�|��S#ttf$r|tur�|cYSwxYw)N)r�r�)r'rrr�)r"r2rFr&r�r�r�r�s        r$�	_get_convzRawConfigParser._get_convsU��	��4�9�9�W�d�F�'��$�'�%�'�
'���
�.�	��6�!���O�	�s��7�7c�<�|j||tf|||d�|��S�Nr")r)�int�r"r2rFr�r�r�r�s       r$�getintzRawConfigParser.getints/���t�~�~�g�v�s�;��$�'/�;�39�;�	;r%c�<�|j||tf|||d�|��Sr+)r)�floatr-s       r$�getfloatzRawConfigParser.getfloats/���t�~�~�g�v�u�;�#�D�'/�;�39�;�	;r%c�H�|j|||jf|||d�|��Sr+)r)�_convert_to_booleanr-s       r$�
getbooleanzRawConfigParser.getboolean$s9���t�~�~�g�v�t�/G�/G�O�"%�D�8�O�GM�O�	Or%c������	��turt�
��	�S�jj	��		�	j�j��t�	j��}|r,|j�D]\}}|�	�j|�<��	��fd�}|r�	fd�}|D�cgc]}|||�f��c}S#t$r��jk7rt���Y��wxYwcc}w)a�Return a list of (name, value) tuples for each option in a section.

        All % interpolations are expanded in the return values, based on the
        defaults passed into the constructor, unless the optional argument
        `raw` is true.  Additional substitutions may be provided using the
        `vars` argument, which must be a dictionary whose contents overrides
        any pre-existing defaults.

        The section DEFAULT is special.
        c�H���jj��|�|��Sr)r�rd)rFr�r2r"s ���r$�<lambda>z'RawConfigParser.items.<locals>.<lambda>As'���d�&9�&9�&D�&D�T��V�Q�v�Y��'+�r%c����|Srr/)rFr�s �r$r7z'RawConfigParser.items.<locals>.<lambda>Ds���!�F�)�r%)
r�rUr�r�r�r�r�r�r�rr�r�r�)r"r2r�r��	orig_keysr rb�value_getterrFr�rWs``       @�r$r�zRawConfigParser.items)s�����f���7�=�?�"��N�N���!��	.�
�H�H�T�^�^�G�,�-������N�	��"�j�j�l�
1�
��U�+0��$�"�"�3�'�(�
1�+���3�L�=F�G�6���f�-�.�G�G���	.��$�.�.�.�$�W�-�-�/�	.��Hs�C�-C*�#C'�&C'c�R�|j�D]}||}||=||fcSt�)z�Remove a section from the parser and return it as
        a (section_name, section_proxy) tuple. If no section is present, raise
        KeyError.

        The section DEFAULT is never returned because it cannot be removed.
        )r�r��r"r rbs   r$�popitemzRawConfigParser.popitemGs:���=�=�?�	�C���I�E��S�	���:��	��r%c�"�|j�Sr)�lower)r"�	optionstrs  r$r�zRawConfigParser.optionxformTs����� � r%c���|r||jk(r|j|�}||jvS||jvry|j|�}||j|vxs||jvS)z�Check for the existence of a given option in a given section.
        If the specified `section` is None or an empty string, DEFAULT is
        assumed. If the specified `section` does not exist, returns False.F)r�r�r�r�)r"r2rFs   r$�
has_optionzRawConfigParser.has_optionWsy���'�T�%9�%9�9��%�%�f�-�F��T�^�^�+�+�
�D�N�N�
*���%�%�f�-�F��d�n�n�W�5�5�0�����/�
1r%c��|r|jj||||�}|r||jk(r
|j}n	|j|}|||j|�<y#t
$r
t
|�d�wxYw)zSet an option.N)r�rhr�r�r�r�rr�)r"r2rFrb�sectdicts     r$rzRawConfigParser.setes�����'�'�2�2�4��&�38�:�E��'�T�%9�%9�9��~�~�H�
8��>�>�'�2��.3���!�!�&�)�*���
8�$�W�-�4�7�
8�s�A$�$A:c�h�|rdj|jd�}n|jd}|jr6|j||j|jj�|�|jD]1}|j|||j|j�|��3y)aOWrite an .ini-format representation of the configuration state.

        If `space_around_delimiters` is True (the default), delimiters
        between keys and values are surrounded by spaces.

        Please note that comments in the original configuration file are not
        preserved when writing the configuration back.
        z {} rN)r=r�r��_write_sectionr�r�r�)r"r�space_around_delimitersr�r2s     r$�writezRawConfigParser.writess���#��
�
�d�.�.�q�1�2�A�� � ��#�A��>�>�����D�$8�$8�$(�N�N�$8�$8�$:�A�
?��~�~�	D�G�����G� $���w� 7� =� =� ?��
D�	Dr%c�V�|jdj|��|D]s\}}|jj||||�}|�|js|t|�j
dd�z}nd}|jdj||���u|jd�y)z-Write a single section to the specified `fp`.z[{}]
N�
z
	r)z{}{}
)rHr=r�rlr�rrz)r"r�section_name�
section_items�	delimiterr rbs       r$rFzRawConfigParser._write_section�s���
�������.�/�'�	2�J�C���'�'�4�4�T�<��5:�<�E�� ��(<�(<�!�C��J�$6�$6�t�V�$D�D�����H�H�X�_�_�S�%�0�1�	2�	����r%c���|r||jk(r
|j}n	|j|}|j|�}||v}|r||=|S#t$r
t	|�d�wxYw)zRemove an option.N)r�r�r�r�rr�)r"r2rFrD�existeds     r$�
remove_optionzRawConfigParser.remove_option�sx���'�T�%9�%9�9��~�~�H�
8��>�>�'�2���!�!�&�)���H�$����� ����
�
8�$�W�-�4�7�
8�s�A�A!c�Z�||jv}|r|j|=|j|=|S)zRemove a file section.)r�r�)r"r2rOs   r$�remove_sectionzRawConfigParser.remove_section�s0���T�^�^�+������w�'��
�
�g�&��r%c�v�||jk7r|j|�st|��|j|Sr)r�r�r�r��r"r s  r$�__getitem__zRawConfigParser.__getitem__�s6���$�&�&�&�t�/?�/?��/D��3�-���}�}�S�!�!r%c���||vr|||ury||jk(r|jj�n+||jvr|j|j�|j	||i�yr)r�r��clearr�r!r<s   r$�__setitem__zRawConfigParser.__setitem__�sj���$�;�4��9��-���$�&�&�&��N�N� � �"�
�D�N�N�
"��N�N�3��%�%�'�����U�|�$r%c��||jk(rtd��|j|�st|��|j	|�y)Nz"Cannot remove the default section.)r�r}r�r�rRrTs  r$�__delitem__zRawConfigParser.__delitem__�sB���$�&�&�&��A�B�B�����$��3�-�����C� r%c�F�||jk(xs|j|�Sr)r�r�rTs  r$�__contains__zRawConfigParser.__contains__�s#���d�*�*�*�C�d�.>�.>�s�.C�Cr%c�2�t|j�dzS)Nrp)r�r�r's r$�__len__zRawConfigParser.__len__�s���4�>�>�"�Q�&�&r%c�t�tj|jf|jj	��Sr)�	itertools�chainr�r�r�r's r$�__iter__zRawConfigParser.__iter__�s)������ 4� 4�6����8K�8K�8M�N�Nr%c��t�}d}d}d}d}d}d}		t|d��D�]t\}}
tj}|jD�cic]}|d��}
}|tjk(r�|
r�i}|
j�D]S\}}|
j
||dz�}|dk(r�!|||<|dk(s|dkDs�1|
|dz
j�s�Ht||�}�U|}
|tjk(r|
r��|jD]%}|
j�j|�s�#d}n|tjk(rd}|
d|j�}|s>|jr |�.|�,|r*||�%||jd�ntj}��b|jj|
�}|r|j!�nd}|�|r||kDr||j|����|}|j"j%|�}|r�|j'd�}||j(vr>|j*r||vr
t-|||��|j(|}|j/|�ne||j0k(r
|j2}nI|j5�}||j(|<t7||�|j8|<|j/|�d}���|�
t;|||
��|j<j%|�}|r�|j'dd	d
�\}}}|s|j?|	|||
�}	|jA|jC��}|j*r||f|vrtE||||��|j/||f�|�|j�}|g||<��Zd||<��a|j?|	|||
�}	��w	|jG�|	r|	�ycc}w#|jG�wxYw)aXParse a sectioned configuration file.

        Each section in a configuration file contains a header, indicated by
        a name in square brackets (`[]`), plus key/value options, indicated by
        `name` and `value` delimited with a specific substring (`=` or `:` by
        default).

        Values can span multiple lines, as long as they are indented deeper
        than the first line of the value. Depending on the parser's mode, blank
        lines may be treated as parts of multiline values or ignored.

        Configuration files may include comments, prefixed by specific
        characters (`#` and `;` by default). Comments may appear on their own
        in an otherwise empty line or may be entered in lines holding values or
        section names. Please note that comments get stripped off when reading configuration files.
        Nrrp)�start���r)�headerrF�virb)$r�	enumerate�sys�maxsizer�r�r~�isspace�minr��strip�
startswithr�r<�NONSPACECRE�searchrd�SECTCREr�r�r�r�rrr�r�r�rr�rr��
_handle_errorr��rstripr�_join_multiline_values)r"r�fpnamer�cursect�sectname�optnamerB�indent_levelr�rY�
comment_startr��inline_prefixes�
next_prefixes�prefix�indexrb�first_nonspace�cur_indent_level�morg�optvals                       r$r
zRawConfigParser._read�s���"���������������_	*� )�"�A� 6�\
L���� #���
�26�2O�2O�"P�Q�1�b�5�"P��"P�#�s�{�{�2��$&�M�)8�)>�)>�)@�F�
��� $�	�	�&�%��'� :�� �B�;�$�05�
�f�-� �A�:�%�!�)��U�1�W�
�8M�8M�8O�,/�
�u�,E�M�
F�'4�O�$�s�{�{�2��#�4�4��F��z�z�|�.�.�v�6�()�
���!�C�K�K�/�$(�M��^�m�,�2�2�4����2�2�*�1�#�/�#�#�G�,�8�#�G�,�3�3�B�7�(+�{�{���!%�!1�!1�!8�!8��!>��=K�>�#7�#7�#9�QR� ��'�G�$�|�3��G�$�+�+�E�2�$4�L����+�+�E�2�B��#%�8�8�H�#5��#�t�~�~�5�#�|�|��N�0J�&;�H�f�<B�'D�!D�&*�n�n�X�&>�G�*�.�.�x�8�%��)=�)=�=�&*�n�n�G�&*�j�j�l�G�7>�D�N�N�8�4�6B�4��6R�D�M�M�(�3�*�.�.�x�8�"&�� ��7����M�M�"�\�\�/�/��6���24�(�(�8�T�7�2S�/�G�R��#*�$(�$6�$6�q�&�&�$�$O��&*�&6�&6�w�~�~�7G�&H�G� $���!)�7� 3�~� E�&:�8�W�;A�6�'K�!K�*�.�.��'�/B�C� &�1�)/�����4:�8��� 0�48��� 0�!%� 2� 2�1�f�f�d� K�A�y\
L�|
�'�'�)���G�
��{#Q��v
�'�'�)�s7�2N8�

N3�AN8�.N8�%N8�+.N8�JN8�3N8�8O
c�v�|j|jf}tj|f|jj��}|D]m\}}|j�D]U\}}t
|t�rdj|�j�}|jj||||�||<�W�oy)NrJ)r�r�r`rar�r�r�r�r@rsr�rj)r"rc�all_sectionsr2rr�vals       r$rtz&RawConfigParser._join_multiline_valuesJs����'�'����7�� ����{�'+�~�~�';�';�'=�?�� ,�	K��G�W�$�]�]�_�
K�	��c��c�4�(��)�)�C�.�/�/�1�C� $� 3� 3� ?� ?��@G�@D�c�!K���
�
K�	Kr%c�p�|j�D]#\}}||j|j|�<�%y)zTRead the defaults passed in the initializer.
        Note: values can be non-string.N)r�r�r�)r"rcr rbs    r$r�zRawConfigParser._read_defaultsVs7��#�.�.�*�	:�J�C��49�D�N�N�4�+�+�C�0�1�	:r%c�V�|st|�}|j|t|��|Sr)r
r<r;)r"�excrurBrYs     r$rrzRawConfigParser._handle_error\s&����v�&�C��
�
�6�4��:�&��
r%c�"�i}	|j|}i}|r9|j	�D]&\}}|�t|�}|||j
|�<�(t|||j�S#t$r||jk7rt|�d�Y�zwxYw)z�Create a sequence of lookups with 'vars' taking priority over
        the 'section' which takes priority over the DEFAULTSECT.

        N)	r�r�r�rr�rr��	_ChainMapr�)r"r2r��sectiondict�vardictr rbs       r$r$zRawConfigParser._unify_valuesbs���
��	8��.�.��1�K�
���"�j�j�l�
7�
��U��$���J�E�16���(�(��-�.�
7���+�t�~�~�>�>���	8��$�.�.�.�$�W�-�4�7�/�	8�s�A'�'$B�
Bc��|j�|jvrtd|z��|j|j�S)zJReturn a boolean value translating from other types if necessary.
        zNot a boolean: %s)r?�BOOLEAN_STATESr})r"rbs  r$r3z#RawConfigParser._convert_to_booleanvs@���;�;�=�� 3� 3�3��0�5�8�9�9��"�"�5�;�;�=�1�1r%r))r2rFrbc���t|t�std��t|t�std��|jr|rt|t�std��yy)a�Raises a TypeError for non-string values.

        The only legal non-string value if we allow valueless
        options is None, so we need to check if the value is a
        string if:
        - we do not allow valueless options, or
        - we allow valueless options but the value is not None

        For compatibility reasons this method is not used in classic set()
        for RawConfigParsers. It is invoked in every case for mapping protocol
        access and in ConfigParser.set().
        zsection names must be stringszoption keys must be stringszoption values must be stringsN)r�rr�r�)r"r2rFrbs    r$�_validate_value_typesz%RawConfigParser._validate_value_types}s[���'�3�'��;�<�<��&�#�&��9�:�:��#�#�u��e�S�)�� ?�@�@�*�(-r%c��|jSr)r�r's r$r�zRawConfigParser.converters�s�����r%r)z<string>)z<dict>)T)>r*r+r,r-�
_SECT_TMPLr�r�rr�r�r�r�rqr=r�r�ror��
_default_dictrr�r!rcr�r�r�rrrrr!r�r'r)r.r1r4r�r=r�rBrrHrFrPrRrUrXrZr\r^rbr
rtr�rrr$r3r��propertyr�rZr[s@r$rrs����6��J�
�I��L�+�_���b�j�j��R�Z�Z�0�G�
�R�Z�Z�	�(�(�u�(�5�r�z�z�
B�F���
�
�<�.�.�U�.�;�R�Z�Z�H�I��"�*�*�U�#�K���d�$� ���e�M�N�!%�
� %�+*�5?�",�d��D�!,�%�&�+*�Z�+�
=�)�!��6
�&�
.�>+0�d�V�#5�J9�7<�$�!��.3���;�
05�4� �;�
27�T�"�O�
#��D�H�<�!�1�3�D�(�
��"�
%�!�D�'�O�z�x
K�:��?�(2�02�"�B�A�*� �� r%rc�B��eZdZdZe�Zd�fd�	Z�fd�Zd�Z�xZ	S)rz(ConfigParser implementing interpolation.c�N��|j||��t�|�	|||�y)zmSet an option.  Extends RawConfigParser.set by validating type and
        interpolation syntax on the value.�rFrbN)r�rUr)r"r2rFrbrWs    �r$rzConfigParser.set�s(���	
�"�"�&��"�>�
���G�V�U�+r%c�H��|j|��t�|�	|�y)z�Create a new section in the configuration.  Extends
        RawConfigParser.add_section by validating if the section name is
        a string.)r2N)r�rUr�)r"r2rWs  �r$r�zConfigParser.add_section�s#���	
�"�"�7�"�3�
���G�$r%c��	|j}t�|_|j|j|i�||_y#|_wxYw)z�Reads the defaults passed in the initializer, implicitly converting
        values to strings like the rest of the API.

        Does not perform interpolation for backwards compatibility.
        N)r�rr!r�)r"rc�hold_interpolations   r$r�zConfigParser._read_defaults�sF��	5�!%�!4�!4��"/�/�D���N�N�D�0�0�(�;�<�"4�D���"4�D��s�8A�	Ar)
r*r+r,r-rr�rr�r�rZr[s@r$rr�s���2�/�1��,�%�5r%rc�x�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Ze
d��Ze
d��Zddd
d
d�d�Zy
)rz+A proxy for a single section from a parser.c��||_||_|jD]?}d|z}tj|j
t
||���}t|||��Ay)z@Creates a view on a section of the specified `name` in `parser`.r���_implN)�_parser�_namer�r�r�r��getattr�setattr)r"rarr&r �getters      r$r!zSectionProxy.__init__�sW�������
��%�%�	'�D��$�,�C��&�&�t�x�x�w�v�s�7K�L�F��D�#�v�&�	'r%c�8�dj|j�S)Nz
<Section: {}>)r=r�r's r$r(zSectionProxy.__repr__�s���%�%�d�j�j�1�1r%c��|jj|j|�st|��|jj	|j|�Sr)r�rBr�r�r�rTs  r$rUzSectionProxy.__getitem__�s?���|�|�&�&�t�z�z�3�7��3�-���|�|����
�
�C�0�0r%c��|jj||��|jj|j||�S)Nr�)r�r�rr�r<s   r$rXzSectionProxy.__setitem__�s6�����*�*�#�U�*�C��|�|����
�
�C��7�7r%c��|jj|j|�r&|jj|j|�st	|��yr)r�rBr�rPr�rTs  r$rZzSectionProxy.__delitem__�sA�����'�'��
�
�C�8����*�*�4�:�:�s�;��3�-��<r%c�N�|jj|j|�Sr)r�rBr�rTs  r$r\zSectionProxy.__contains__�s���|�|�&�&�t�z�z�3�7�7r%c�4�t|j��Sr)r��_optionsr's r$r^zSectionProxy.__len__�s���4�=�=�?�#�#r%c�>�|j�j�Sr)r�rbr's r$rbzSectionProxy.__iter__�s���}�}��'�'�)�)r%c���|j|jjk7r%|jj|j�S|jj	�Sr)r�r�r�rrcr's r$r�zSectionProxy._options�sD���:�:����5�5�5��<�<�'�'��
�
�3�3��<�<�(�(�*�*r%c��|jSr)r�r's r$razSectionProxy.parser�s���|�|�r%c��|jSr)r�r's r$rzSectionProxy.name�s���z�z�r%NF)r�r�r�c�b�|s|jj}||j|f|||d�|��S)z�Get an option value.

        Unless `fallback` is provided, `None` will be returned if the option
        is not found.

        r")r�r�r�)r"rFr�r�r�r�r�s       r$r�zSectionProxy.get�s?����L�L�$�$�E��T�Z�Z��2�S�t�&�2�*0�2�	2r%r)r*r+r,r-r!r(rUrXrZr\r^rbr�r�rarr�r/r%r$rr�sk��5�'�2�1�
8� �
8�$�*�+���������
2��D��
2r%rc�X�eZdZdZej
d�Zd�Zd�Zd�Z	d�Z
d�Zd�Zy	)
ra/Enables reuse of get*() methods between the parser and section proxies.

    If a parser class implements a getter directly, the value for the given
    key will be ``None``. The presence of the converter name here enables
    section proxies to find and use the implementation on the parser class.
    z^get(?P<name>.+)$c�
�||_i|_t|j�D]]}|jj	|�}|rtt
|j|��s�@d|j|jd�<�_y)Nr)r��_data�dir�	GETTERCREr��callabler�r�)r"rar�r�s    r$r!zConverterMapping.__init__sj�������
��$�,�,�'�	/�F����$�$�V�,�A��H�W�T�\�\�6�%B�C��*.�D�J�J�q�w�w�v��'�		/r%c� �|j|Sr)r�rTs  r$rUzConverterMapping.__getitem__s���z�z�#��r%c	���	d|z}|dk(rtd��||j|<tj|jj|��}||_	t|j||�|jj�D]0}tj|j|��}t|||��2y#t$r%tdj|t|����wxYw)Nr�zIncompatible key: {} (type: {})z)Incompatible key: cannot use "" as a name)r&r�)
r�r}r=r�r�r�r�r�r)�	converterr��valuesr�)r"r rb�k�func�proxyr�s       r$rXzConverterMapping.__setitem__s���	8����A�
��:��H�I�I���
�
�3��� � ����!7�!7�e�D���������a��&��\�\�(�(�*�	&�E��&�&�u�y�y��=�F��E�1�f�%�	&���	8�� � &��s�D��I� 6�8�
8�	8�s�B=�=.C+c��	d|xsdz}|j|=tj|j
f|j
j
��D]}	t||��y#t$rt|��wxYw#t$rY�6wxYw)Nr�)	r�r�r�r`rar�r��delattrr)r"r r��insts    r$rZzConverterMapping.__delitem__#s���	 �����%�A�
�J�J�s�O��O�O�T�\�\�O�T�\�\�5H�5H�5J�K�	�D�
���a� �	���	 ��3�-��	 ��"�
��
�s�	A$�A<�$A9�<	B�Bc�,�t|j�Sr)�iterr�r's r$rbzConverterMapping.__iter__1s���D�J�J��r%c�,�t|j�Sr)r�r�r's r$r^zConverterMapping.__len__4s���4�:�:��r%N)
r*r+r,r-r�r�r�r!rUrXrZrbr^r/r%r$rr�s8�����
�
�/�0�I�/��&� � �r%r)(r-�collections.abcr�collectionsrr�r�rr`rr�rir��__all__r�r�rrr rrrrrr	rrr
r
r�objectr�rrrrrrrrr/r%r$�<module>r�s>��K�Z+�-��	��	�	�
��5���
�����

�I�
� �U� �.�E�.�46�5�6�6&�E�&�+��+�	9�&8�	9��1��
.�0�
.�>�5�>�-��-�"
���
�
� E+��E+�PG+�M�G+�T,5�-�,5�^w	 �n�w	 �t5�?�5�@C2�>�C2�L8�~�8r%
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!