Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/idlelib/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/idlelib/__pycache__/autoexpand.cpython-312.opt-2.pyc

�

%Μg���V�	ddlZddlZGd�d�Zedk(rddlmZedd��yy)	�Nc�\�eZdZejej
zdzZd�Zd�Zd�Z	d�Z
y)�
AutoExpand�_c�j�|j|_|jj|_d|_y)N)�text�bell�state)�self�editwins  �//usr/local/lib/python3.12/idlelib/autoexpand.py�__init__zAutoExpand.__init__s#���L�L��	��I�I�N�N��	���
�c��	|jjd�}|jjdd�}|js|j	�}d}n-|j\}}}}||k7s||k7r|j	�}d}|s|j�y|j
�}|jjdt|�zd�||}	|dzt|�z}|dk(r|j�|jjd|	�|jjd�}|jjdd�}||||f|_y)N�insert�insert linestartzinsert lineendr�breakzinsert - %d chars�)
r�index�getr	�getwordsr�getprevword�delete�lenr)
r
�event�	curinsert�curline�wordsrr�line�word�newwords
          r�expand_word_eventzAutoExpand.expand_word_events)��;��I�I�O�O�H�-�	��)�)�-�-� 2�4D�E���z�z��M�M�O�E��E�)-���&�E�5�&�$���"�d�g�o��
�
�������I�I�K�����!���	�	���,�s�4�y�8�(�C���,�����c�%�j�(���A�:��I�I�K��	�	����7�+��I�I�O�O�H�-�	��)�)�-�-� 2�4D�E���E�9�g�5��
�rc�&�	|j�}|sgS|jjdd�}tjd|zdz|�}~|jjdd�}tjd|zdz|�}~|s|sgSg}i}|j�|D]*}|j|�r�|j
|�|||<�,|D]*}|j|�r�|j
|�|||<�,|j
|�|S)Nz1.0zinsert wordstartz\bz\w+\bzinsert wordend�end)rrr�re�findall�reverse�append)	r
r�before�wbefore�after�wafterr�dict�ws	         rrzAutoExpand.getwords6s��I����!����I������u�&8�9���*�*�U�T�\�H�4�f�=����	�	�
�
�.��6�����E�D�L�8�3�U�;����v��I����������A��x�x��{���L�L��O��D��G�	��A��x�x��{���L�L��O��D��G�	�
	���T���rc���	|jjdd�}t|�}|dkDr3||dz
|jvr|dz
}|dkDr||dz
|jvr�||dS)Nrrrr)rrr�	wordchars)r
r�is   rrzAutoExpand.getprevwordUsm��3��y�y�}�}�/��:����I���!�e��Q�q�S�	�T�^�^�3��!��A��!�e��Q�q�S�	�T�^�^�3��A�B�x�rN)�__name__�
__module__�__qualname__�string�
ascii_letters�digitsr/r
r!rr�rrrrs/���$�$�v�}�}�4�s�:�I��
�6�>rr�__main__)�mainz!idlelib.idle_test.test_autoexpand�)�	verbosity)r$r4rr1�unittestr9r7rr�<module>r=s<��
�
�
�H�H�V�z����	,��:�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists