Current File : //proc/self/root/usr/lib/python3/dist-packages/twisted/python/__pycache__/modules.cpython-312.pyc
�

Ϫ�f�h��6�dZddlmZddlZddlZddlZddlZddlmZm	Z
ddlmZm
Z
ddlmZddlmZddlmZmZdd	lmZdd
lmZe�ZdgZeduZerej;d�nej;d
�d�Zd�ZGd�d�Z Gd�d�Z!Gd�de �Z"Gd�de �Z#Gd�de�Z$e
e$�Gd�d��Z%e%�Z&e
e$�Gd�d��Z'ee'ejPe$�d�Z)Gd�d �Z*e*�Z+d$d!�Z,d"�Z-d#�Z.y)%a_
This module aims to provide a unified, object-oriented view of Python's
runtime hierarchy.

Python is a very dynamic language with wide variety of introspection utilities.
However, these utilities can be hard to use, because there is no consistent
API.  The introspection API in python is made up of attributes (__name__,
__module__, func_name, etc) on instances, modules, classes and functions which
vary between those four types, utility modules such as 'inspect' which provide
some functionality, the 'imp' module, the "compiler" module, the semantics of
PEP 302 support, and setuptools, among other things.

At the top, you have "PythonPath", an abstract representation of sys.path which
includes methods to locate top-level modules, with or without loading them.
The top-level exposed functions in this module for accessing the system path
are "walkModules", "iterModules", and "getModule".

From most to least specific, here are the objects provided::

                  PythonPath  # sys.path
                      |
                      v
                  PathEntry   # one entry on sys.path: an importer
                      |
                      v
                 PythonModule # a module or package that can be loaded
                      |
                      v
                 PythonAttribute # an attribute of a module (function or class)
                      |
                      v
                 PythonAttribute # an attribute of a function or class
                      |
                      v
                     ...

Here's an example of idiomatic usage: this is what you would do to list all of
the modules outside the standard library's python-files directory::

    import os
    stdlibdir = os.path.dirname(os.__file__)

    from twisted.python.modules import iterModules

    for modinfo in iterModules():
        if (modinfo.pathEntry.filePath.path != stdlibdir
            and not modinfo.isPackage()):
            print('unpackaged: %s: %s' % (
                modinfo.name, modinfo.filePath.path))

@var theSystemPath: The very top of the Python object space.
@type theSystemPath: L{PythonPath}
�)�annotationsN)�dirname�split)�	Interface�implementer��nativeString)�registerAdapter)�FilePath�UnlistableError)�namedAny)�
ZipArchivez.pyz.pyoz.pycc�8�t|�}d|vxr
d|vxrd|vS)z�
    cheezy fake test for proper identifier-ness.

    @param string: a L{str} which might or might not be a valid python
        identifier.
    @return: True or False
    � �.�-r)�string�
textStrings  �8/usr/lib/python3/dist-packages/twisted/python/modules.py�_isPythonIdentifierrWs-���f�%�J��j� �T�S�
�%:�T�s�*�?T�T�c�N�|j�d}t|�d}|dk(S)Nr��__init__)�splitext�	splitpath)�fpath�extless�basends   r�_isPackagePathr cs/���n�n��q�!�G�
�w�
��
"�F��Z��rc�<�eZdZdZd�Zd
d�Zd�Zd�Zd�Zd�Z	d�Z
y	)�_ModuleIteratorHelperz�
    This mixin provides common behavior between python module and path entries,
    since the mechanism for searching sys.path and __path__ attributes is
    remarkably similar.
    c	#�TK�i}|jj�sy|j�D�]c}	t|j	��}|D�]@}|j
�d}|j�dt|�}|tvrft|�s�H|j|�}|jd�ddk(r�q||vs�vd||<t|||j��}||k7sJ�|����|st|�r|j�s��|j|j��}tD]Y}|j!d|z�}	|	j�s�(||vs�-d||<t||	|j��}||k7sJ�|����@��C��fy#t
$rY��twxYw�w)a
        Loop over the modules present below this entry or package on PYTHONPATH.

        For modules which are not packages, this will yield nothing.

        For packages and path entries, this will only yield modules one level
        down; i.e. if there is a package a.b.c, iterModules on a will only
        return a.b.  If you want to descend deeply, use walkModules.

        @return: a generator which yields PythonModule instances that describe
        modules which can be, or have been, imported.
        Nrr���rT)�filePath�exists�
_packagePaths�sorted�childrenrr�basename�len�PYTHON_EXTENSIONSr�_subModuleNamer�PythonModule�	_getEntry�isdir�child)
�self�yielded�placeToLookr)�potentialTopLevel�ext�potentialBasename�modname�pm�initpys
          r�iterModulesz!_ModuleIteratorHelper.iterModulesrs��������}�}�#�#�%���-�-�/�(	"�K�
�!�+�"6�"6�"8�9��&.�"
"�!�'�0�0�2�1�5��$5�$>�$>�$@��C��H�9�$M�!��+�+�/�/@�A� �"�1�1�2C�D�G��}�}�S�)�"�-��;�!��g�-�+/���(�)�'�3D�d�n�n�FV�W��!�T�z�)�z� ���2�3D�E�0�6�6�8� �"�1�1�2C�2L�2L�2N�O�G�0�"��!2�!8�!8��c�9I�!J��!�=�=�?�w�g�/E�/3�G�G�,�!-�g�v�t�~�~�?O�!P�B�#%��:�-�:�"$�H�!�"�7"
"�
(	"��#�
��
�s<�2F(�F�A7F(�BF(�F(�"6F(�	F%�!F(�$F%�%F(c#�vK�|��|j�D]}|j|��Ed{����y7��w)z�
        Similar to L{iterModules}, this yields self, and then every module in my
        package or entry, and every submodule in each package or entry.

        In other words, this is deep, and L{iterModules} is shallow.
        ��importPackagesN�r;�walkModules�r2r>�packages   rr@z!_ModuleIteratorHelper.walkModules�sA�����
��'�'�)�	J�G��*�*�.�*�I�I�I�	J�I�s�-9�7�9c��|S)z�
        This is a hook to provide packages with the ability to specify their names
        as a prefix to submodules here.
        ��r2�mns  rr-z$_ModuleIteratorHelper._subModuleName�s	��
�	rc��t��)z�
        Implement in subclasses to specify where to look for modules.

        @return: iterable of FilePath-like objects.
        ��NotImplementedError�r2s rr'z#_ModuleIteratorHelper._packagePaths�s
��"�#�#rc��t��)z�
        Implement in subclasses to specify what path entry submodules will come
        from.

        @return: a PathEntry instance.
        rHrJs rr/z_ModuleIteratorHelper._getEntry�s
��"�#�#rc��|j�D]$}|j|j|�k(s�"|cSt|��)a(
        Retrieve a module from below this path or package.

        @param modname: a str naming a module to be loaded.  For entries, this
        is a top-level, undotted package name, and for packages it is the name
        of the module without the package prefix.  For example, if you have a
        PythonModule representing the 'twisted' package, you could use::

            twistedPackageObj['python']['modules']

        to retrieve this module.

        @raise KeyError: if the module is not found.

        @return: a PythonModule.
        )r;�namer-�KeyError)r2r8�modules   r�__getitem__z!_ModuleIteratorHelper.__getitem__�sE��"�&�&�(�	�F��{�{�d�1�1�'�:�:��
�	��w��rc��t��)aD
        Implemented to raise NotImplementedError for clarity, so that attempting to
        loop over this object won't call __getitem__.

        Note: in the future there might be some sensible default for iteration,
        like 'walkEverything', so this is deliberately untested and undefined
        behavior.
        rHrJs r�__iter__z_ModuleIteratorHelper.__iter__�s
��"�#�#rN�F)�__name__�
__module__�__qualname__�__doc__r;r@r-r'r/rPrRrDrrr"r"ks,���9"�v	J��$�$� �,	$rr"c�J�eZdZdZ										dd�Zd	d�Zd�Zefd�Zd�Z	y)
�PythonAttributeag
    I represent a function, class, or other object that is present.

    @ivar name: the fully-qualified python name of this attribute.

    @ivar onObject: a reference to a PythonModule or other PythonAttribute that
    is this attribute's logical parent.

    @ivar name: the fully qualified python name of the attribute represented by
    this class.
    c�<�||_||_||_||_y)aJ
        Create a PythonAttribute.  This is a private constructor.  Do not construct
        me directly, use PythonModule.iterAttributes.

        @param name: the FQPN
        @param onObject: see ivar
        @param loaded: always True, for now
        @param pythonValue: the value of the attribute we're pointing to.
        N)rM�onObject�_loaded�pythonValue)r2rMr[�loadedr]s     rrzPythonAttribute.__init__�s!����	� ��
����&��rc�"�d|j�d�S)NzPythonAttribute<�>�rMrJs r�__repr__zPythonAttribute.__repr__s��!�$�)�)��a�0�0rc��|jS)a	
        Return a boolean describing whether the attribute this describes has
        actually been loaded into memory by importing its module.

        Note: this currently always returns true; there is no Python parser
        support in this module yet.
        )r\rJs r�isLoadedzPythonAttribute.isLoadeds���|�|�rc��|jS)z�
        Load the value associated with this attribute.

        @return: an arbitrary Python object, or 'default' if there is an error
        loading it.
        )r]�r2�defaults  r�loadzPythonAttribute.loads�����rc#�K�tj|j��D]%\}}t|jdz|z|d|����'y�w)NrT)�inspect�
getmembersrhrYrM�r2rM�vals   r�iterAttributeszPythonAttribute.iterAttributes&sJ���� �+�+�D�I�I�K�8�	K�I�D�#�!�$�)�)�c�/�D�"8�$��c�J�J�	K�s�A
AN)
rM�strr[rYr^�boolr]�object�return�None�rrro)
rTrUrVrWrrbrd�_nothingrhrnrDrrrYrY�sN��
�'��'�#2�'�<@�'�OU�'�	
�'�"1��$� �KrrYc�z��eZdZdZ								d
d�Zd�Zdd�Zd�Zd�Zd�Z	e
fd�Zdd	�Zd�fd
�	Z
d�Zd�Z�xZS)r.a?
    Representation of a module which could be imported from sys.path.

    @ivar name: the fully qualified python name of this module.

    @ivar filePath: a FilePath-like object which points to the location of this
    module.

    @ivar pathEntry: a L{PathEntry} instance which this module was located
    from.
    c��t|�}|jd�rJ�||_||_|j	�|_||_y)z�
        Create a PythonModule.  Do not construct this directly, instead inspect a
        PythonPath or other PythonModule instances.

        @param name: see ivar
        @param filePath: see ivar
        @param pathEntry: see ivar
        z	.__init__N)r	�endswithrMr%�parent�
parentPath�	pathEntry)r2rMr%r{�_names     rrzPythonModule.__init__8sC���T�"���>�>�+�.�.�.���	� ��
�"�/�/�+���"��rc��|jS�N)r{rJs rr/zPythonModule._getEntryJs���~�~�rc�"�d|j�d�S)zK
        Return a string representation including the module name.
        z
PythonModule<r`rarJs rrbzPythonModule.__repr__Ms���t�y�y�m�1�-�-rc�x�|jjjj|j�duS)z�
        Determine if the module is loaded into sys.modules.

        @return: a boolean: true if loaded, false if not.
        N)r{�
pythonPath�
moduleDict�getrMrJs rrdzPythonModule.isLoadedSs.���~�~�(�(�3�3�7�7��	�	�B�$�N�Nrc#��K�|j�std��tj|j	��D]%\}}t|jdz|z|d|����'y�w)a 
        List all the attributes defined in this module.

        Note: Future work is planned here to make it possible to list python
        attributes on a module without loading the module by inspecting ASTs or
        bytecode, but currently any iteration of PythonModule objects insists
        they must be loaded, and will use inspect.getmodule.

        @raise NotImplementedError: if this module is not loaded.

        @return: a generator yielding PythonAttribute instances describing the
        attributes of this module.
        z6You can't load attributes from non-loaded modules yet.rTN)rdrIrjrkrhrYrMrls   rrnzPythonModule.iterAttributes[sg�����}�}��%�H��
�!�+�+�D�I�I�K�8�	K�I�D�#�!�$�)�)�c�/�D�"8�$��c�J�J�	K�s�A(A*c�,�t|j�S)zt
        Returns true if this module is also a package, and might yield something
        from iterModules.
        )r r%rJs r�	isPackagezPythonModule.isPackageps��
�d�m�m�,�,rc��	|jjj|j�S#t$r|t
ur|cYS�wxYw)aX
        Load this module.

        @param default: if specified, the value to return in case of an error.

        @return: a genuine python module.

        @raise Exception: Importing modules is a risky business;
        the erorrs of any code run at module scope may be raised from here, as
        well as ImportError if something bizarre happened to the system path
        between the discovery of this PythonModule object and the attempt to
        import it.  If you specify a default, the error will be swallowed
        entirely, and not logged.

        @rtype: types.ModuleType.
        )r{r��moduleLoaderrM�
BaseExceptionrurfs  rrhzPythonModule.loadwsE��"	��>�>�,�,�9�9�$�)�)�D�D���	��h�&����	�s�.1�A�Ac�`�t|t�r|j|jk(StS)z=
        PythonModules with the same name are equal.
        )�
isinstancer.rM�NotImplemented)r2�others  r�__eq__zPythonModule.__eq__�s'���e�\�*��:�:����*�*��rc�h��|r |j�r|j�t�|�
|��S)Nr=)r�rh�superr@)r2r>�	__class__s  �rr@zPythonModule.walkModules�s+����d�n�n�.��I�I�K��w�"�.�"�A�Arc�&�|jdz|zS)zG
        submodules of this module are prefixed with our name.
        rrarEs  rr-zPythonModule._subModuleName�s���y�y�3���#�#rc#��K�|j�sy|j�r�|j�}t|d�r�|jD]�}||j
jk(r+|j
j�sJ�|j
���G|jjj|�}|j�s�}|����yy|j
��y�w)zZ
        Yield a sequence of FilePath-like objects which represent path segments.
        N�__path__)r�rdrh�hasattrr�rz�pathr&r{r��
_smartPath)r2rh�fn�smps    rr'zPythonModule._packagePaths�s������~�~����=�=�?��9�9�;�D��t�Z�(��-�-�&�B��T�_�_�1�1�1�#���5�5�7�7�7�"�o�o�-�"�n�n�7�7�B�B�2�F���:�:�<�"%�I�&�)��/�/�!�s�CC �	C )rMror%z
FilePath[str]r{�	PathEntryrrrsrt)r�rqrrrprS)rTrUrVrWrr/rbrdrnr�rurhr�r@r-r'�
__classcell__)r�s@rr.r.+sg���
�#��#�#0�#�=F�#�	
�#�$�.�O�K�*-�$��0�B�
$�"rr.c�*�eZdZdZd�Zd�Zdd�Zd�Zy)r�z�
    I am a proxy for a single entry on sys.path.

    @ivar filePath: a FilePath-like object pointing at the filesystem location
    or archive file where this path entry is stored.

    @ivar pythonPath: a PythonPath instance.
    c� �||_||_y)zE
        Create a PathEntry.  This is a private constructor.
        N)r%r�)r2r%r�s   rrzPathEntry.__init__�s��!��
�$��rc��|Sr~rDrJs rr/zPathEntry._getEntry�s���rc�"�d|j�d�S)Nz
PathEntry<r`�r%rJs rrbzPathEntry.__repr__�s���D�M�M�,�A�.�.rc#�(K�|j��y�wr~r�rJs rr'zPathEntry._packagePaths�s�����m�m��s�Nrt)rTrUrVrWrr/rbr'rDrrr�r��s���%��/�rr�c��eZdZdZd�Zy)�IPathImportMapperzj
    This is an internal interface, used to map importers to factories for
    FilePath-like objects.
    c��y)a
        Return a FilePath-like object.

        @param pathLikeString: a path-like string, like one that might be
        passed to an import hook.

        @return: a L{FilePath}, or something like it (currently only a
        L{ZipPath}, but more might be added later).
        NrD)�pathLikeStrings r�mapPathzIPathImportMapper.mapPath�s�rN�rTrUrVrWr�rDrrr�r��s���
	rr�c��eZdZdZd�Zy)�_DefaultMapImplz,Wrapper for the default importer, i.e. None.c��t|�Sr~)r)r2�fsPathStrings  rr�z_DefaultMapImpl.mapPath�s
����%�%rNr�rDrrr�r��s
��6�&rr�c��eZdZdZd�Zd�Zy)�_ZipMapImplz;IPathImportMapper implementation for zipimport.ZipImporter.c��||_yr~)�importer)r2r�s  rrz_ZipMapImpl.__init__�s	�� ��
rc��t|jj�}t|jj�}t|�}||k(r|S|j	|�}|}|D]}|j|�}�|S)a
        Map the given FS path to a ZipPath, by looking at the ZipImporter's
        "archive" attribute and using it as our ZipArchive root, then walking
        down into the archive from there.

        @return: a L{zippath.ZipPath} or L{zippath.ZipArchive} instance.
        )rr��archiver�segmentsFromr1)r2r��za�myPath�itsPath�segs�zp�segs        rr�z_ZipMapImpl.mapPath�s{����
�
�-�-�
.���$�-�-�/�/�0���<�(���W���I�
�#�#�F�+��
���	�C����#��B�	��	rN)rTrUrVrWrr�rDrrr�r��s��E�!�rr�c�"�tjS)z�
    Provide the default behavior of PythonPath's sys.path factory, which is to
    return the current value of sys.path.

    @return: L{sys.path}
    )�sysr�rDrr�_defaultSysPathFactoryr�s
���8�8�Orc��eZdZdZdej
ejejedfd�Z	e
d��Zd�Zd�Z
d�Zd�Zd	�Zd
d
�Zd�Zdd�Zy)�
PythonPatha�
    I represent the very top of the Python object-space, the module list in
    C{sys.path} and the modules list in C{sys.modules}.

    @ivar _sysPath: A sequence of strings like C{sys.path}.  This attribute is
    read-only.

    @ivar sysPath: The current value of the module search path list.
    @type sysPath: C{list}

    @ivar moduleDict: A dictionary mapping string module names to module
    objects, like C{sys.modules}.

    @ivar sysPathHooks: A list of PEP-302 path hooks, like C{sys.path_hooks}.

    @ivar moduleLoader: A function that takes a fully-qualified python name and
    returns a module, like L{twisted.python.reflect.namedAny}.
    Nc�z�����fd�}n|�t}||_�|_||_||_||_||_y)aJ
        Create a PythonPath.  You almost certainly want to use
        modules.theSystemPath, or its aliased methods, rather than creating a
        new instance yourself, though.

        All parameters are optional, and if unspecified, will use 'system'
        equivalents that makes this PythonPath like the global L{theSystemPath}
        instance.

        @param sysPath: a sys.path-like list to use for this PythonPath, to
        specify where to load modules from.

        @param moduleDict: a sys.modules-like dictionary to use for keeping
        track of what modules this PythonPath has loaded.

        @param sysPathHooks: sys.path_hooks-like list of PEP-302 path hooks to
        be used for this PythonPath, to determie which importers should be
        used.

        @param importerCache: a sys.path_importer_cache-like list of PEP-302
        importers.  This will be used in conjunction with the given
        sysPathHooks.

        @param moduleLoader: a module loader function which takes a string and
        returns a module.  That is to say, it is like L{namedAny} - *not* like
        L{__import__}.

        @param sysPathFactory: a 0-argument callable which returns the current
        value of a sys.path-like list of strings.  Specify either this, or
        sysPath, not both.  This alternative interface is provided because the
        way the Python import mechanism works, you can re-bind the 'sys.path'
        name and that is what is used for current imports, so it must be a
        factory rather than a value to deal with modification by rebinding
        rather than modification by mutation.  Note: it is not recommended to
        rebind sys.path.  Although this mechanism can deal with that, it is a
        subtle point which some tools that it is easy for tools which interact
        with sys.path to miss.
        Nc����Sr~rD)�sysPaths�r�<lambda>z%PythonPath.__init__.<locals>.<lambda>`s���W�r)r��_sysPathFactory�_sysPathr��sysPathHooks�
importerCacher�)r2r�r�r�r�r��sysPathFactorys `     rrzPythonPath.__init__0sJ���^��,�N�
�
#�3�N�-�����
�$���(���*���(��rc�"�|j�S)zL
        Retrieve the current value of the module search path list.
        )r�rJs rr�zPythonPath.sysPathjs��
�#�#�%�%rc���|}d|jvrI|jdj|jjd�dd�}d|jvr�It	t|j��rtt|j��}nt|j�}||jvr'tj|�d|j�d�d��|S)zl
        Determine where a given Python module object came from by looking at path
        entries.
        rNr$z
 (for module zR) not in path importer cache (PEP 302 violation - check your local configuration).�)�
stacklevel)rTr��joinrr r�__file__rr��warnings�warn)r2�modobj�
topPackageObj�rvals    r�_findEntryPathStringzPythonPath._findEntryPathStringqs���
�
��]�+�+�+� �O�O�����/�/�5�5�c�:�3�B�?�@��M��]�+�+�+��(�=�#9�#9�:�;��7�=�#9�#9�:�;�D��=�1�1�2�D��t�)�)�)��M�M�����*��	
��rc��|jj|t�}|tur$|jD]}	||�}�
|turd}t|t�j|�S#t$rY�BwxYw)z�
        Given a path entry from sys.path which may refer to an importer,
        return the appropriate FilePath-like instance.

        @param pathName: a str describing the path.

        @return: a FilePath-like object.
        N)r�r�rur��ImportErrorr��_theDefaultMapperr�)r2�pathName�importr�hooks    rr�zPythonPath._smartPath�s����$�$�(�(��8�<���h���)�)�
���"�8�n�G�
�
�(�"��� ��*;�<�D�D�X�N�N��	#����s�A,�,	A8�7A8c#�lK�|jD]!}|j|�}t||����#y�w)zm
        Iterate the entries on my sysPath.

        @return: a generator yielding PathEntry objects
        N)r�r�r�)r2r��fps   r�iterEntrieszPythonPath.iterEntries�s6�������	&�H�����*�B��B��%�%�	&�s�24c��|jj|�}|�Rt|j|j	|��|�}|j|j
�}t
|||�Sd|vr|}|jd�D]}||}�	|S|j�D]}|j|k(s�|cSt|��)a�
        Get a python module by its given fully-qualified name.

        @param modname: The fully-qualified Python module name to load.

        @type modname: C{str}

        @return: an object representing the module identified by C{modname}

        @rtype: L{PythonModule}

        @raise KeyError: if the module name is not a valid module name, or no
            such module can be identified as loadable.
        r)r�r�r�r�r�r�r.rr;rMrN)r2r8�moduleObject�pe�mp�pkgrMrOs        rrPzPythonPath.__getitem__�s��� ���*�*�7�3���#������ 9� 9�,� G�H�$��B�����!6�!6�7�B����R�0�0��'�>��C��
�
�c�*�
 ���$�i��
 ��J��&�&�(�	�F��{�{�g�%��
�	��w��rc�F�	|j|�y#t$rYywxYw)z�
        Check to see whether or not a module exists on my import path.

        @param module: The name of the module to look for on my import path.
        @type module: C{str}
        TF)rPrN)r2rOs  r�__contains__zPythonPath.__contains__�s*��	����V�$����	��	�s��	 � c�<�d|j�d|j�d�S)zO
        Display my sysPath and moduleDict in a string representation.
        zPythonPath(�,�))r�r�rJs rrbzPythonPath.__repr__�s#���T�\�\�,�A�d�o�o�-@��B�Brc#�jK�|j�D]}|j�Ed{����y7��w)z<
        Yield all top-level modules on my sysPath.
        N)r�r;)r2�entrys  rr;zPythonPath.iterModules�s5�����%�%�'�	+�E��(�(�*�*�*�	+�*�s�'3�1�3c#�nK�|j�D]}|jd��Ed{����y7��w)z�
        Similar to L{iterModules}, this yields every module on the path, then every
        submodule in each package or entry.
        Fr=Nr?rAs   rr@zPythonPath.walkModules�s<����
�'�'�)�	A�G��*�*�%�*�@�@�@�	A�@�s�)5�3�5rtrS)rTrUrVrWr��modules�
path_hooks�path_importer_cacher
r�propertyr�r�r�r�rPr�rbr;r@rDrrr�r�sp���*��;�;��^�^��-�-���8)�t�&��&� �DO�(&�$ �L�C�+�Arr�c�.�tj|��S)z}
    Deeply iterate all modules on the global python path.

    @param importPackages: Import packages as they are seen.
    r=)�
theSystemPathr@r=s rr@r@�s���$�$�N�$�C�Crc�*�tj�S)zu
    Iterate all modules and top-level packages on the global Python path, but
    do not descend into packages.
    )r�r;rDrrr;r;s��
�$�$�&�&rc��t|S)z1
    Retrieve a module from the system path.
    )r�)�
moduleNames r�	getModuler�s����$�$rrS)/rW�
__future__rrjr�r��	zipimport�os.pathrrr�zope.interfacerr�twisted.python.compatr	�twisted.python.componentsr
�twisted.python.filepathrr�twisted.python.reflectr
�twisted.python.zippathrrqrur,�OPTIMIZED_MODE�appendrr r"rYr.r�r�r�r�r��zipimporterr�r�r�r@r;r�rDrr�<module>r�sC��
4�l#��
���0�1�.�5�=�+�-��8���G���D�������V�$����V�$�	U� �D$�D$�N6K�6K�rJ"�(�J"�Z�%��6�	��$
�
��&�&� �&�$�%��
�
���� ��<��Y�2�2�4E�F��[A�[A�|��
�D�'�%r
¿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!