/opt/imh/python3.13/lib/python3.13/idlelib/__pycache__
Edit: /opt/imh/python3.13/lib/python3.13/idlelib/__pycache__/squeezer.cpython-313.pyc (14353B)
e"2 S r SSKrSSKrSSKJr SSKJr SSKJr SSK J
r
SSKJr SS jr
" S S
\R 5 r " S S5 r\R# 5 \S
:X a SSKJr \" SSSS9 gg)a An IDLE extension to avoid having very long texts printed in the shell.
A common problem in IDLE's interactive shell is printing of large amounts of
text into the shell. This makes looking at the previous history difficult.
Worse, this can cause IDLE to become very slow, even to the point of being
completely unusable.
This extension will automatically replace long texts with a small button.
Double-clicking this button will remove it and insert the original text instead.
Middle-clicking will copy the text to the clipboard. Right-clicking will open
the text in a separate viewing window.
Additionally, any output can be manually "squeezed" by the user. This includes
output written to the standard error stream ("stderr"), such as exception
messages and their tracebacks.
N)
messagebox)idleConf) view_text)Hovertip)macosxc ^ SnSnSnSn[ R " SU 5 Ha nUR 5 U-
nX7-
nXW-
nX S:X a XQ: a
XES-
U- -
nUS-
nSnOX S:X d eXRXR- -
-
nXQ: a US-
nUnUS-
nMc U[ U 5 U-
-
nUS: a XES-
U- -
nU$ US- nU$ )zCount the number of lines in a given string.
Lines are counted as if the string was wrapped so that lines are never over
linewidth characters long.
Tabs are considered tabwidth characters long.
r z[\t\n]
)refinditerstartlen)s linewidthtabwidthpos linecountcurrent_columnmnumcharss 6/opt/imh/python3.13/lib/python3.13/idlelib/squeezer.pycount_lines_with_wrappingr s H
CIN
[[A
&779s?"
6T> ) q0Y>> NIN6T>!>.*CDDN )Q !)q; '@ c!fsl"Nq(Y66
Q c L \ rS rSrSrS rS rSS jrSS jrSS jr S r
S
rSrg)
ExpandingButtonT a Class for the "squeezed" text buttons used by Squeezer
These buttons are displayed inside a Tk Text widget in place of text. A
user can then use the button to replace it with the original text, copy
the original text to the clipboard or view the original text in a separate
window.
Each button is tied to a Squeezer instance, and it knows to update the
Squeezer instance when it is expanded (and therefore removed).
c ^ TU l X l X0l X@l UR =U l nUR
=U l nUR R U l US:w a SOSnSU SU S3n[ R R XUSSS 9 S
n [ X SS9 U R S
U R 5 [ R " 5 ( a U R SU R" 5 OU R SU R" 5 U R% U4S j5 S U l U R) U R* 5 g )Nr
lineslinezSqueezed text ( z).z#FFFFC0z#FFFFE0)text
backgroundactivebackgroundz5Double-click to expand, right-click for more options.P )hover_delayz
z
z
c J > T[ U 5 [ U 5 [ U5 - $ N)int)offsetlengthr s r *ExpandingButton.__init__..z s 1S[Vs6{1J#Kr )r tags
numoflinessqueezereditwinr# perbottom base_texttkButton__init__r bindexpandr isAquaTkcontext_menu_eventselection_handleis_dangerous
after_idleset_is_dangerous)
selfr r/ r0 r1 r2 r# line_pluralitybutton_textbutton_tooltip_texts
` r r8 ExpandingButton.__init___ s $
!)!1!11w"<<' D ++$.!O'
|1^4DBG
4K&/) M
D ; %t{{3??IIlD$;$;<IIlD$;$;<K M !--.r c ^ SU R R 5 - mU R S: =( dS [ U R 5 S: =( d4 [ U4S j[ R " SU R 5 5 5 U l g )N2 i iP c 3 ^ ># U H" n[ UR S 5 5 T: v M$ g7f)r N)r group).0
line_matchdangerous_line_lens r 3ExpandingButton.set_is_dangerous..