HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/idlelib/__pycache__/autoexpand.cpython-310.opt-2.pyc
o

�i��@sH	ddlZddlZGdd�d�Zedkr"ddlmZeddd�dSdS)	�Nc@s<eZdZejejdZdd�Zdd�Zdd�Z	dd	�Z
d
S)�
AutoExpand�_cCs|j|_|jj|_d|_dS)N)�text�bell�state)�selfZeditwin�r�//usr/local/lib/python3.10/idlelib/autoexpand.py�__init__s

zAutoExpand.__init__c
Cs�	|j�d�}|j�dd�}|js|��}d}n|j\}}}}||ks'||kr-|��}d}|s5|��dS|��}|j�dt|�d�||}	|dt|�}|dkrX|��|j�	d|	�|j�d�}|j�dd�}||||f|_dS)N�insert�insert linestartzinsert lineendr�breakzinsert - %d chars�)
r�index�getr�getwordsr�getprevword�delete�lenr)
r�eventZ	curinsertZcurline�wordsrr�line�wordZnewwordrrr	�expand_word_events0zAutoExpand.expand_word_eventc	Cs�	|��}|s	gS|j�dd�}t�d|d|�}~|j�dd�}t�d|d|�}~|s3|s3gSg}i}|��|D]}|�|�rEq=|�|�|||<q=|D]}|�|�rYqQ|�|�|||<qQ|�|�|S)Nz1.0zinsert wordstartz\bz\w+\bzinsert wordend�end)rrr�re�findall�reverse�append)	rr�beforeZwbeforeZafterZwafterr�dict�wrrr	r6s6






zAutoExpand.getwordscCs`	|j�dd�}t|�}|dkr*||d|jvr*|d}|dkr*||d|jvs||d�S)Nrrrr)rrr�	wordchars)rr�irrr	rUs�zAutoExpand.getprevwordN)�__name__�
__module__�__qualname__�string�
ascii_letters�digitsr"r
rrrrrrr	rsr�__main__)�mainz!idlelib.idle_test.test_autoexpand�)�	verbosity)rr'rr$Zunittestr+rrrr	�<module>sK�