Current File : //proc/self/root/lib/python3/dist-packages/pexpect/__pycache__/FSM.cpython-312.pyc
�

��ek4���dZGd�de�ZGd�d�ZddlZddlZejddk\Zd�Zd	�Z	d
�Z
d�Zd�Zd
�Z
d�Zedk(re�yy)a1This module implements a Finite State Machine (FSM). In addition to state
this FSM also maintains a user defined "memory". So this FSM can be used as a
Push-down Automata (PDA) since a PDA is a FSM + memory.

The following describes how the FSM works, but you will probably also need to
see the example function to understand how the FSM is used in practice.

You define an FSM by building tables of transitions. For a given input symbol
the process() method uses these tables to decide what action to call and what
the next state will be. The FSM has a table of transitions that associate:

        (input_symbol, current_state) --> (action, next_state)

Where "action" is a function you define. The symbols and states can be any
objects. You use the add_transition() and add_transition_list() methods to add
to the transition table. The FSM also has a table of transitions that
associate:

        (current_state) --> (action, next_state)

You use the add_transition_any() method to add to this transition table. The
FSM also has one default transition that is not associated with any specific
input_symbol or state. You use the set_default_transition() method to set the
default transition.

When an action function is called it is passed a reference to the FSM. The
action function may then access attributes of the FSM such as input_symbol,
current_state, or "memory". The "memory" attribute can be any object that you
want to pass along to the action functions. It is not used by the FSM itself.
For parsing you would typically pass a list to be used as a stack.

The processing sequence is as follows. The process() method is given an
input_symbol to process. The FSM will search the table of transitions that
associate:

        (input_symbol, current_state) --> (action, next_state)

If the pair (input_symbol, current_state) is found then process() will call the
associated action function and then set the current state to the next_state.

If the FSM cannot find a match for (input_symbol, current_state) it will then
search the table of transitions that associate:

        (current_state) --> (action, next_state)

If the current_state is found then the process() method will call the
associated action function and then set the current state to the next_state.
Notice that this table lacks an input_symbol. It lets you define transitions
for a current_state and ANY input_symbol. Hence, it is called the "any" table.
Remember, it is always checked after first searching the table for a specific
(input_symbol, current_state).

For the case where the FSM did not match either of the previous two cases the
FSM will try to use the default transition. If the default transition is
defined then the process() method will call the associated action function and
then set the current state to the next_state. This lets you define a default
transition as a catch-all case. You can think of it as an exception handler.
There can be only one default transition.

Finally, if none of the previous cases are defined for an input_symbol and
current_state then the FSM will raise an exception. This may be desirable, but
you can always prevent this just by defining a default transition.

Noah Spurrier 20020822

PEXPECT LICENSE

    This license is approved by the OSI and FSF as GPL-compatible.
        http://opensource.org/licenses/isc-license.txt

    Copyright (c) 2012, Noah Spurrier <noah@noah.org>
    PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
    PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE
    COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES.
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

c��eZdZdZd�Zd�Zy)�ExceptionFSMz This is the FSM Exception class.c��||_y�N)�value)�selfrs  �-/usr/lib/python3/dist-packages/pexpect/FSM.py�__init__zExceptionFSM.__init__[s	����
�c�2�dt|j�zS)NzExceptionFSM: )�strr�rs r�__str__zExceptionFSM.__str__^s���#�d�j�j�/�1�1r
N)�__name__�
__module__�__qualname__�__doc__r	r�r
rrrWs��*��2r
rc�N�eZdZdZdd�Zd�Zd
d�Zd
d�Zd
d�Zd�Z	d	�Z
d
�Zd�Zy)�FSMz*This is a Finite State Machine (FSM).
    Nc��i|_i|_d|_d|_||_|j|_d|_d|_||_y)aThis creates the FSM. You set the initial state here. The "memory"
        attribute is any object that you want to pass along to the action
        functions. It is not used by the FSM. For parsing you would typically
        pass a list to be used as a stack. N)	�state_transitions�state_transitions_any�default_transition�input_symbol�
initial_state�
current_state�
next_state�action�memory)rrrs   rr	zFSM.__init__fsO��"$���%'��"�"&��� ���*���!�/�/�����������r
c�4�|j|_d|_y)z�This sets the current_state to the initial_state and sets
        input_symbol to None. The initial state was set by the constructor
        __init__(). N)rrrr
s r�resetz	FSM.resetzs��"�/�/��� ��r
c�2�|�|}||f|j||f<y)a�This adds a transition that associates:

                (input_symbol, current_state) --> (action, next_state)

        The action may be set to None in which case the process() method will
        ignore the action and only set the next_state. The next_state may be
        set to None in which case the current state will be unchanged.

        You can also set transitions for a list of symbols by using
        add_transition_list(). N)r)rr�staterrs     r�add_transitionzFSM.add_transition�s)�����J�9?��8L�����e�4�5r
c�B�|�|}|D]}|j||||��y)a�This adds the same transition for a list of input symbols.
        You can pass a list or a string. Note that it is handy to use
        string.digits, string.whitespace, string.letters, etc. to add
        transitions that match character classes.

        The action may be set to None in which case the process() method will
        ignore the action and only set the next_state. The next_state may be
        set to None in which case the current state will be unchanged. N)r$)r�list_input_symbolsr#rrrs      r�add_transition_listzFSM.add_transition_list�s4�����J�.�	J�L�����u�f�j�I�	Jr
c�.�|�|}||f|j|<y)aThis adds a transition that associates:

                (current_state) --> (action, next_state)

        That is, any input symbol will match the current state.
        The process() method checks the "any" state associations after it first
        checks for an exact match of (input_symbol, current_state).

        The action may be set to None in which case the process() method will
        ignore the action and only set the next_state. The next_state may be
        set to None in which case the current state will be unchanged. N)r)rr#rrs    r�add_transition_anyzFSM.add_transition_any�s$�����J�.4�j�-A��"�"�E�*r
c��||f|_y)a�This sets the default transition. This defines an action and
        next_state if the FSM cannot find the input symbol and the current
        state in the transition list and if the FSM cannot find the
        current_state in the transition_any list. This is useful as a final
        fall-through state for catching errors and undefined states.

        The default transition can be removed by setting the attribute
        default_transition to None. N)r)rrrs   r�set_default_transitionzFSM.set_default_transition�s��$*�:�"6��r
c��||f|jvr|j||fS||jvr|j|S|j�|jStdt	|��dt	|��d���)anThis returns (action, next state) given an input_symbol and state.
        This does not modify the FSM state, so calling this method has no side
        effects. Normally you do not call this method directly. It is called by
        process().

        The sequence of steps to check for a defined transition goes from the
        most specific to the least specific.

        1. Check state_transitions[] that match exactly the tuple,
            (input_symbol, state)

        2. Check state_transitions_any[] that match (state)
            In other words, match a specific state and ANY input_symbol.

        3. Check if the default_transition is defined.
            This catches any input_symbol and any state.
            This is a handler for errors, undefined states, or defaults.

        4. No transition was defined. If we get here then raise an exception.
        zTransition is undefined: (z, z).)rrrrr)rrr#s   r�get_transitionzFSM.get_transition�s���.
�%� �D�$:�$:�:��)�)�<��*?�@�@�
�d�0�0�
0��-�-�e�4�4�
�
$�
$�
0��*�*�*���\�"�C��J�!0�2�
2r
c���||_|j|j|j�\|_|_|j�|j|�|j|_d|_y)a�This is the main method that you call to process input. This may
        cause the FSM to change state and call an action. This method calls
        get_transition() to find the action and next_state associated with the
        input_symbol and current_state. If the action is None then the action
        is not called and only the current state is changed. This method
        processes one complete input symbol. You can process a list of symbols
        (or a string) by calling process_list(). N)rr-rrr)rrs  r�processzFSM.process�s]��)���)-�)<�)<�d�>O�>O�QU�Qc�Qc�)d�&���d�o��;�;�"��K�K���!�_�_�����r
c�4�|D]}|j|��y)zpThis takes a list and sends each element to process(). The list may
        be a string or any iterable object. N)r/)r�
input_symbols�ss   r�process_listzFSM.process_list�s��
�	�A��L�L�!��	r
r)NN)
rrrrr	r!r$r'r)r+r-r/r3rr
rrras8����(!�M�"J� B�$7�2�B�"r
r�N�c�N�|jj|j�yr)r�appendr��fsms r�BeginBuildNumberr:s���J�J���s�'�'�(r
c��|jj�}||jz}|jj|�yr�r�poprr7�r9r2s  r�BuildNumberr?s4���
�
����A�	�C����A��J�J���q�r
c��|jj�}|jjt|��yr)rr=r7�intr>s  r�EndBuildNumberrBs(���
�
����A��J�J���s�1�v�r
c���|jj�}|jj�}|jdk(r|jj||z�y|jdk(r|jj||z
�y|jdk(r|jj||z�y|jdk(r|jj||z�yy)N�+�-�*�/r<)r9�ar�als   r�
DoOperatorrJ!s���	�����	�B�	�����	�B�
���3���
�
���2��7�#�	�	�	�S�	 ��
�
���2��7�#�	�	�	�S�	 ��
�
���2��7�#�	�	�	�S�	 ��
�
���2��7�#�
!r
c�\�tt|jj���yr)�printrrr=r8s r�DoEqualrM-s��	�#�c�j�j�n�n��
� r
c�V�td�tt|j��y)NzThat does not compute.)rLrrr8s r�ErrorrO0s��	�
"�#�	�#�c���
� r
c��tdg�}|jtd�|jddd�|j	ddt
d�|j
tjdtd�|j
tjdtd�|j
tjdtd�|j
ddtd�t�td�td�td�td	�td
�trt nt"d�}|j%|�y)z�This is where the example starts and the FSM state transitions are
    defined. Note that states are strings (such as 'INIT'). This is not
    necessary, but it makes the example easier to read. �INITN�=�BUILDING_NUMBERz+-*/zEnter an RPN Expression.z.Numbers may be integers. Operators are * / + -z4Use the = sign to evaluate and print the expression.z
For example: z    167 3 2 2 * * * 1 - =z> )rr+rOr)r$rMr'�string�digitsr:r?�
whitespacerBrJrL�PY3�input�	raw_inputr3)�f�inputstrs  r�mainr\4s���	�V�R��A����e�V�,����6�4��0����3�f��SY�Z����6�=�=�f�AQ�Sd�e����6�=�=�.?��Sd�e����6�,�,�.?��SY�Z����6�f��SY�Z�	�G�	�
$�%�	�
:�;�	�
@�A�	�/��	�
%�&���)�T�2�H��N�N�8�r
�__main__)r�	Exceptionrr�sysrT�version_inforWr:r?rBrJrMrOr\rrr
r�<module>rasy��R�h2�9�2�Z�Z�T�
�
�����a���)��
�
$�!�!��2�z���F�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!