• File: autoexpand.cpython-37.opt-2.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/proc/self/root/opt/alt/python37/lib64/python3.7/idlelib/__pycache__/autoexpand.cpython-37.opt-2.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 2.03 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

YI~d@sBddlZddlZGdddZedkr>ddlmZeddddS)	Nc@s<eZdZejejdZddZddZddZ	dd	Z
d
S)
AutoExpand_cCs|j|_|jj|_d|_dS)N)textbellstate)selfZeditwinr7/opt/alt/python37/lib64/python3.7/idlelib/autoexpand.py__init__s
zAutoExpand.__init__c
Cs|jd}|jdd}|js.|}d}n*|j\}}}}||ksL||krX|}d}|sh|dS|}|jdt|d||}	|dt|}|dkr||j	d|	|jd}|jdd}||||f|_dS)Ninsertzinsert linestartzinsert lineendrbreakzinsert - %d chars)
rindexgetrgetwordsrgetprevworddeletelenr)
rZeventZ	curinsertZcurlinewordsrrlinewordZnewwordrrr	expand_word_events.zAutoExpand.expand_word_eventc	Cs|}|sgS|jdd}td|d|}~|jdd}td|d|}~|sd|sdgSg}i}|x*|D]"}||rqz|||||<qzWx*|D]"}||rq|||||<qW|||S)Nz1.0zinsert wordstartz\bz\w+\bzinsert wordendend)rrrrefindallreverseappend)	rrZbeforeZwbeforeZafterZwafterrdictwrrr	r6s4






zAutoExpand.getwordscCsJ|jdd}t|}x&|dkr<||d|jkr<|d}qW||dS)Nzinsert linestartrrr
)rrr	wordchars)rrirrr	rUs
zAutoExpand.getprevwordN)__name__
__module____qualname__stringZ
ascii_lettersdigitsrr
rrrrrrr	rs
r__main__)mainz!idlelib.idle_test.test_autoexpand)	verbosity)rr$rr!Zunittestr'rrrr	<module>s
K