HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/idlelib/__pycache__/AutoExpand.cpython-35.pyc


FüƒaC
ã@s`dZddlZddlZGdd„dƒZedkr\ddlZejdddƒdS)	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	ú(/usr/lib/python3.5/idlelib/AutoExpand.pyÚ__init__ szAutoExpand.__init__c
CsN|jjdƒ}|jjddƒ}|jsE|jƒ}d}n?|j\}}}}||ksr||kr„|jƒ}d}|s›|jjƒdS|jƒ}|jjdt|ƒdƒ||}	|dt|ƒ}|dkrû|jjƒ|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ƒx7|D]/}|j|ƒrÁq©|j|ƒ|||<q©Wx7|D]/}|j|ƒrûqã|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)	rrZbeforeZwbeforeZafterZwafterrÚ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_lettersZdigitsrrrrrr	r	r	r
rsrÚ__main__z!idlelib.idle_test.test_autoexpandÚ	verbosityé)Ú__doc__r$rrr!ZunittestÚmainr	r	r	r
Ú<module>sP