HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/idlelib/__pycache__/zzdummy.cpython-311.opt-1.pyc
�

��Vc���dZddlmZddlmZd�ZGd�d��Ze���edkrddl	Z	e	j
d	d
d���dSdS)
z�Example extension, also used for testing.

See extend.txt for more details on creating an extension.
See config-extension.def for configuring an extension.
�)�idleConf��wrapsc�>��t���d�fd�	��}|S)z9Apply a formatting function to all of the selected lines.Nc����|j���\}}}}tt|��dz
��D]}||}�||��||<�|j�||||��dS)N��break)�	formatter�
get_region�range�len�
set_region)	�self�event�head�tail�chars�lines�pos�line�format_lines	        ��#D:\Python311\Lib\idlelib\zzdummy.py�applyzformat_selection.<locals>.applys����#'�>�#<�#<�#>�#>� ��d�E�5���U���a��(�(�	1�	1�C���:�D�$��T�4�0�0�E�#�J�J���!�!�$��e�U�;�;�;��w�)Nr)rrs` r�format_selectionrs=����;������������Lrc�h�eZdZdZdddgfgZd�Zed���Zed���Z	ed���Z
d	S)
�ZzDummyz3Prepend or remove initial text from selected lines.�format)zZ inz<<z-in>>)zZ outz	<<z-out>>c�D�||_|j|_|j|_dS)z+Initialize the settings for this extension.N)�editwin�text�fregionr
)rr s  r�__init__zZzDummy.__init__%s������L��	� �����rc�<�tjddd��|_dS)z!Load class variables from config.�
extensionsrzz-textN)r�	GetOption�ztext)�clss r�reloadzZzDummy.reload+s���&�|�Y��I�I��	�	�	rc��|j�|��S)z�Insert text at the beginning of each selected line.

        This is bound to the <<z-in>> virtual event when the extensions
        are loaded.
        )r')rrs  r�
z_in_eventzZzDummy.z_in_event0s���*�$�d�$�$�$rc�v�|�|j��sdnt|j��}||d�S)z�Remove specific text from the beginning of each selected line.

        This is bound to the <<z-out>> virtual event when the extensions
        are loaded.
        rN)�
startswithr'r
)rr�zlengths   r�z_out_eventzZzDummy.z_out_event9s6�� �?�?�4�:�6�6�K�!�!�C��
�O�O���G�H�H�~�rN)�__name__�
__module__�__qualname__�__doc__�menudefsr#�classmethodr)rr+r/�rrrrs�������=�=�
� �"�
�	��H�)�)�)��J�J��[�J��%�%���%��������rr�__main__Nzidlelib.idle_test.test_zzdummy�F)�	verbosity�exit)r3�idlelib.configr�	functoolsrrrr)r0�unittest�mainr6rr�<module>r?s�����$�#�#�#�#�#����������'�'�'�'�'�'�'�'�T�������z��M��O�O�O��H�M�2�a�e�L�L�L�L�L�L�M�Mr