Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/idlelib/AutoExpand.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Qc@s/ddlZddlZddd��YZdS(i�Nt
AutoExpandcBsReZddgfgZejejdZd�Zd�Zd�Z	d�Z
RS(	teditsE_xpand Words<<expand-word>>t_cCs|j|_d|_dS(N(ttexttNonetstate(tselfteditwin((s(/sys/lib/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(Ntinsertsinsert linestartsinsert lineenditbreaksinsert - %d charsi(
RtindextgetRtgetwordstbelltgetprevwordtdeletetlenR	(
Rteventt	curinserttcurlinetwordsRR	tlinetwordtnewword((s(/sys/lib/python2.7/idlelib/AutoExpand.pytexpand_word_events.			

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�|j|�|||<q�|j|�|S(Ns1.0sinsert wordstarts\bs\w+\bsinsert wordendtend(RRRtretfindalltreversetappend(	RRtbeforetwbeforetaftertwafterRtdicttw((s(/sys/lib/python2.7/idlelib/AutoExpand.pyR
0s4





cCs]|jjdd�}t|�}x1|dkrT||d|jkrT|d}q$W||S(Nsinsert linestartR	ii(RRRt	wordchars(RRti((s(/sys/lib/python2.7/idlelib/AutoExpand.pyRNs
&(sE_xpand Words<<expand-word>>(t__name__t
__module__tmenudefststringt
ascii_letterstdigitsR%RRR
R(((s(/sys/lib/python2.7/idlelib/AutoExpand.pyRs			((R*RR(((s(/sys/lib/python2.7/idlelib/AutoExpand.pyt<module>s

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.