AnonSec Shell
Server IP : 162.213.251.212  /  Your IP : 3.144.86.102   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : allssztx ( 535)
PHP Version : 8.1.31
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/alt/python34/lib64/python3.4/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /proc/self/root/opt/alt/python34/lib64/python3.4/idlelib/__pycache__/AutoExpand.cpython-34.pyc
�
e fC
�@scdZddlZddlZGdd�d�Zedkr_ddlZejddd�ndS)	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.

This is an extension file and there is only one instance of AutoExpand.
�Nc@sfeZdZddgfgZejejdZdd�Zdd�Z	d	d
�Z
dd�Zd
S)�
AutoExpandZedit�E_xpand Word�<<expand-word>>�_cCs|j|_d|_dS)N)�text�state)�selfZeditwin�r	�7/opt/alt/python34/lib64/python3.4/idlelib/AutoExpand.py�__init__ szAutoExpand.__init__c
CsT|jjd�}|jjdd�}|jsE|j�}d}nB|j\}}}}||ksr||kr�|j�}d}n|s�|jj�dS|j�}|jjdt|�d�||}	|dt|�}|dkr|jj�n|jj	d|	�|jjd�}|jjdd�}||||f|_dS)z1Replace the current word with the next expansion.�insertzinsert linestartzinsert lineendr�breakzinsert - %d chars�)
r�index�getr�getwordsZbell�getprevwordZdelete�lenr)
rZeventZ	curinsertZcurline�wordsrr�line�wordZnewwordr	r	r
�expand_word_event$s.			

zAutoExpand.expand_word_eventc	Cs-|j�}|sgS|jjdd�}tjd|d|�}~|jjdd�}tjd|d|�}~|r�|r�gSg}i}|j�x:|D]2}|j|�r�q�n|j|�|||<q�Wx:|D]2}|j|�rq�n|j|�|||<q�W|j|�|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)	rrZbeforeZwbefore�afterZwafterr�dict�wr	r	r
r?s4





zAutoExpand.getwordscCsc|jjdd�}t|�}x1|dkrT||d|jkrT|d}q$W||d�S)z)Return the word prefix before the cursor.zinsert linestartrrrN)rrr�	wordchars)rr�ir	r	r
r^s
&zAutoExpand.getprevwordN)rr)�__name__�
__module__�__qualname__Zmenudefs�stringZ
ascii_lettersZdigitsr rrrrr	r	r	r
rsr�__main__z!idlelib.idle_test.test_autoexpand�	verbosity�)�__doc__r%rrr"Zunittest�mainr	r	r	r
�<module>sP

Anon7 - 2022
AnonSec Team