/opt/imh/python3.13/lib/python3.13/idlelib/__pycache__
Edit: /opt/imh/python3.13/lib/python3.13/idlelib/__pycache__/history.cpython-313.pyc (5211B)
e R S r SSKJr " S S5 r\S:X a SSKJr \" SSS S
9 gg)z9Implement Idle Shell history mechanism with History class )idleConfc 6 \ rS rSrSrS rS rS rS rS r Sr
g )
History a+ Implement Idle Shell history mechanism.
store - Store source statement (called from pyshell.resetoutput).
fetch - Fetch stored statement matching prefix already entered.
history_next - Bound to <
> event (default Alt-N).
history_prev - Bound to <> event (default Alt-P).
c Xl / U l SU l SU l [ R
" SSSSS5 U l UR SU R 5 UR SU R 5 g) a4 Initialize data attributes and bind event methods.
.text - Idle wrapper of tk Text widget, with .bell().
.history - source statements, possibly with multiple lines.
.prefix - source already entered at prompt; filters history list.
.pointer - index into history.
.cyclic - wrap around history list (or not).
Nmainr cyclic boolz<>z<>)
texthistoryprefixpointerr GetOptionr bindhistory_prevhistory_next)selfr s 5/opt/imh/python3.13/lib/python3.13/idlelib/history.py__init__History.__init__ sb ((HaP ($*;*;< $d&7&78 c " U R SS9 g)z5Fetch later statement; start with earliest if cyclic.Freversebreakfetchr events r r History.history_next s
5
!r c " U R SS9 g)z0Fetch earlier statement; start with most recent.Tr r r r s r r History.history_prev$ s
4
r c [ U R 5 nU R nU R nUbq Ubn U R R SSS5 ( d- U R R
SS5 U R U :w a S=p4U R R SS5 Ub UcU U R R
SS5 nU( a UnO/U R ( a SnOU R R 5 g[ U5 n X1( a SOS-
nUS: d X2: a U R R 5 U R ( d US: a gU R R
SS5 U:w a9 U R R SS5 U R R SUS 5 S=p4OdU R U nUSU U:X aI [ U5 U: a: U R R SS5 U R R SUS 5 OGM U R R S5 U R R S
SS5 X0l X@l g)
a Fetch statement and replace current line in text widget.
Set prefix and pointer as needed for successive fetches.
Reset them to None, None when returning to the start line.
Sound bell when return to start line or cannot leave a line
because cyclic is False.
Ninsertz!=zend-1ciomarkr
r stdinselz1.0end)lenr
r r r comparegetmark_setr belldeleter% see
tag_remove)r r nhistr r nprefixitems r r
History.fetch) s DLL!,,6#5yy 4::IIMM(H5g9NN#'' ""8X6?fnYY]]8X6F;; GIINN$f+Wr!+G{g. {{w{yy}}Xx8FB ((8< ((67C'++G<<(DHW~'CI,? 84 49! "
h UE51r c UR 5 n[ U5 S: a7 U R R U5 U R R U5 SU l SU l g! [ a N6f = f)z.Store Shell input statement into history list. N)stripr+ r
remove
ValueErrorappendr r )r sources r store
History.storeZ se v;?
##F+
LL'
s A&