/opt/imh/python3.13/lib/python3.13/idlelib/__pycache__
Edit: /opt/imh/python3.13/lib/python3.13/idlelib/__pycache__/autoexpand.cpython-313.pyc (4687B)
e T S r SSKrSSKr " S S5 r\S:X a SSKJr \" SSS 9 gg)
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.
There is only one instance of Autoexpand.
Nc d \ rS rSr\R
\R - S- rS rS r S r
S rSrg)
AutoExpand _c j UR U l U R R U l S U l g )N)textbellstate)selfeditwins 8/opt/imh/python3.13/lib/python3.13/idlelib/autoexpand.py__init__AutoExpand.__init__ s# LL IINN
c U R R S5 nU R R SS5 nU R ( d U R 5 nSnO+U R u pEpgXb:w d Xs:w a U R 5 nSnU( d U R 5 gU R
5 nU R R S[ U5 - S5 XE n US- [ U5 - nUS:X a U R 5 U R R SU 5 U R R S5 nU R R SS5 nXEX#4U l g)z1Replace the current word with the next expansion.insertinsert linestartzinsert lineendr breakzinsert - %d chars )
r indexgetr
getwordsr getprevworddeletelenr )
r event curinsertcurlinewordsr r linewordnewwords
r
expand_word_eventAutoExpand.expand_word_event s IIOOH- ))-- 24DEzzMMOEE)-&E&"do
IIK! ,s4y8(C,c%j(A:IIK 7+IIOOH- ))-- 24DE95
r c b U R 5 nU( d / $ U R R SS5 n[ R " SU- S- U5 nAU R R SS5 n[ R " SU- S- U5 nAU( d U( d / $ / n0 nUR 5 U H0 nUR U5 ( a M UR
U5 XU' M2 U H0 nUR U5 ( a M UR
U5 XU' M2 UR
U5 U$ )z?Return a list of words that match the prefix before the cursor.z1.0zinsert wordstartz\bz\w+\bzinsert wordendend)r r r refindallreverseappend) r r! beforewbeforeafterwafterr dictws r
r AutoExpand.getwords6 s !Iu&89**UT\H4f=
.6EDL83U;vIAxx{{LLOG Axx{{LLOG
Tr c U R R SS5 n[ U5 nUS: a7 XS-
U R ; a" US-
nUS: a XS-
U R ; a M" XS $ )z)Return the word prefix before the cursor.r r r r N)r r r wordchars)r r is r
r AutoExpand.getprevwordU sd yy}}/:I!eqS T^^3!A !eqS T^^3Bxr )r r
r N)
__name__
__module____qualname____firstlineno__string
ascii_lettersdigitsr3 r r# r r __static_attributes__ r r
r r s/ $$v}}4s:I
6>r r __main__)mainz!idlelib.idle_test.test_autoexpand ) verbosity)__doc__r' r: r r6 unittestr@ r> r r
rE s<