Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/thread-self/root/lib64/python2.7/idlelib/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/lib64/python2.7/idlelib/AutoExpand.pyc

�
{fc@scdZddlZddlZdd	d��YZedkr_ddlZejddd�ndS(
s[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.
i����Nt
AutoExpandcBsReZddgfgZejejdZd�Zd�Zd�Z	d�Z
RS(	teditsE_xpand Words<<expand-word>>t_cCs|j|_d|_dS(N(ttexttNonetstate(tselfteditwin((s*/usr/lib64/python2.7/idlelib/AutoExpand.pyt__init__ s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(s1Replace the current word with the next expansion.tinsertsinsert linestartsinsert lineenditbreaksinsert - %d charsi(
RtindextgetRtgetwordstbelltgetprevwordtdeletetlenR	(
Rteventt	curinserttcurlinetwordsRR	tlinetwordtnewword((s*/usr/lib64/python2.7/idlelib/AutoExpand.pytexpand_word_event$s.			

c	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(s?Return a list of words that match the prefix before the cursor.s1.0sinsert wordstarts\bs\w+\bsinsert wordendtend(RRRtretfindalltreversetappend(	RRtbeforetwbeforetaftertwafterRtdicttw((s*/usr/lib64/python2.7/idlelib/AutoExpand.pyR
?s4





cCs]|jjdd�}t|�}x1|dkrT||d|jkrT|d}q$W||S(s)Return the word prefix before the cursor.sinsert linestartR	ii(RRRt	wordchars(RRti((s*/usr/lib64/python2.7/idlelib/AutoExpand.pyR^s
&(sE_xpand Words<<expand-word>>(t__name__t
__module__tmenudefststringt
ascii_letterstdigitsR%RRR
R(((s*/usr/lib64/python2.7/idlelib/AutoExpand.pyRs			t__main__s!idlelib.idle_test.test_autoexpandt	verbosityi((t__doc__R*RRR'tunittesttmain(((s*/usr/lib64/python2.7/idlelib/AutoExpand.pyt<module>sP

Hacked By AnonymousFox1.0, Coded By AnonymousFox