SILENT KILLERPanel

Current Path: > > opt > alt > python36 > lib64 > python3.6 > idlelib > __pycache__ >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/alt/python36/lib64/python3.6/idlelib/__pycache__/

NameTypeSizeLast ModifiedActions
__init__.cpython-36.opt-1.pyc File 509 bytes April 17 2024 17:19:40.
__init__.cpython-36.opt-2.pyc File 139 bytes April 17 2024 17:19:27.
__init__.cpython-36.pyc File 509 bytes April 17 2024 17:19:44.
__main__.cpython-36.opt-1.pyc File 270 bytes April 17 2024 17:19:40.
__main__.cpython-36.opt-2.pyc File 191 bytes April 17 2024 17:19:27.
__main__.cpython-36.pyc File 270 bytes April 17 2024 17:19:45.
_pyclbr.cpython-36.opt-1.pyc File 10427 bytes April 17 2024 17:19:40.
_pyclbr.cpython-36.opt-2.pyc File 6811 bytes April 17 2024 17:19:27.
_pyclbr.cpython-36.pyc File 10427 bytes April 17 2024 17:19:45.
autocomplete.cpython-36.opt-1.pyc File 7191 bytes April 17 2024 17:19:40.
autocomplete.cpython-36.opt-2.pyc File 5559 bytes April 17 2024 17:19:27.
autocomplete.cpython-36.pyc File 7191 bytes April 17 2024 17:19:45.
autocomplete_w.cpython-36.opt-1.pyc File 11067 bytes April 17 2024 17:19:40.
autocomplete_w.cpython-36.opt-2.pyc File 10315 bytes April 17 2024 17:19:27.
autocomplete_w.cpython-36.pyc File 11115 bytes April 17 2024 17:19:45.
autoexpand.cpython-36.opt-1.pyc File 2826 bytes April 17 2024 17:19:40.
autoexpand.cpython-36.opt-2.pyc File 2068 bytes April 17 2024 17:19:27.
autoexpand.cpython-36.pyc File 2826 bytes April 17 2024 17:19:45.
browser.cpython-36.opt-1.pyc File 9573 bytes April 17 2024 17:19:40.
browser.cpython-36.opt-2.pyc File 6987 bytes April 17 2024 17:19:27.
browser.cpython-36.pyc File 9573 bytes April 17 2024 17:19:45.
calltip.cpython-36.opt-1.pyc File 5610 bytes April 17 2024 17:19:40.
calltip.cpython-36.opt-2.pyc File 3981 bytes April 17 2024 17:19:27.
calltip.cpython-36.pyc File 5610 bytes April 17 2024 17:19:45.
calltip_w.cpython-36.opt-1.pyc File 6163 bytes April 17 2024 17:19:40.
calltip_w.cpython-36.opt-2.pyc File 5222 bytes April 17 2024 17:19:27.
calltip_w.cpython-36.pyc File 6163 bytes April 17 2024 17:19:45.
codecontext.cpython-36.opt-1.pyc File 8147 bytes April 17 2024 17:19:40.
codecontext.cpython-36.opt-2.pyc File 5157 bytes April 17 2024 17:19:27.
codecontext.cpython-36.pyc File 8182 bytes April 17 2024 17:19:44.
colorizer.cpython-36.opt-1.pyc File 8362 bytes April 17 2024 17:19:40.
colorizer.cpython-36.opt-2.pyc File 8195 bytes April 17 2024 17:19:27.
colorizer.cpython-36.pyc File 8362 bytes April 17 2024 17:19:45.
config.cpython-36.opt-1.pyc File 30507 bytes April 17 2024 17:19:40.
config.cpython-36.opt-2.pyc File 20324 bytes April 17 2024 17:19:27.
config.cpython-36.pyc File 30507 bytes April 17 2024 17:19:45.
config_key.cpython-36.opt-1.pyc File 13848 bytes April 17 2024 17:19:40.
config_key.cpython-36.opt-2.pyc File 12773 bytes April 17 2024 17:19:27.
config_key.cpython-36.pyc File 13848 bytes April 17 2024 17:19:45.
configdialog.cpython-36.opt-1.pyc File 77534 bytes April 17 2024 17:19:40.
configdialog.cpython-36.opt-2.pyc File 47761 bytes April 17 2024 17:19:27.
configdialog.cpython-36.pyc File 77534 bytes April 17 2024 17:19:45.
debugger.cpython-36.opt-1.pyc File 14219 bytes April 17 2024 17:19:40.
debugger.cpython-36.opt-2.pyc File 14060 bytes April 17 2024 17:19:27.
debugger.cpython-36.pyc File 14219 bytes April 17 2024 17:19:45.
debugger_r.cpython-36.opt-1.pyc File 13767 bytes April 17 2024 17:19:40.
debugger_r.cpython-36.opt-2.pyc File 11368 bytes April 17 2024 17:19:27.
debugger_r.cpython-36.pyc File 13893 bytes April 17 2024 17:19:45.
debugobj.cpython-36.opt-1.pyc File 5173 bytes April 17 2024 17:19:40.
debugobj.cpython-36.opt-2.pyc File 5165 bytes April 17 2024 17:19:27.
debugobj.cpython-36.pyc File 5173 bytes April 17 2024 17:19:45.
debugobj_r.cpython-36.opt-1.pyc File 2009 bytes April 17 2024 17:19:40.
debugobj_r.cpython-36.opt-2.pyc File 2001 bytes April 17 2024 17:19:27.
debugobj_r.cpython-36.pyc File 2009 bytes April 17 2024 17:19:45.
delegator.cpython-36.opt-1.pyc File 1276 bytes April 17 2024 17:19:40.
delegator.cpython-36.opt-2.pyc File 1168 bytes April 17 2024 17:19:27.
delegator.cpython-36.pyc File 1276 bytes April 17 2024 17:19:44.
dynoption.cpython-36.opt-1.pyc File 2287 bytes April 17 2024 17:19:40.
dynoption.cpython-36.opt-2.pyc File 1899 bytes April 17 2024 17:19:27.
dynoption.cpython-36.pyc File 2287 bytes April 17 2024 17:19:45.
editor.cpython-36.opt-1.pyc File 48421 bytes April 17 2024 17:19:40.
editor.cpython-36.opt-2.pyc File 46762 bytes April 17 2024 17:19:27.
editor.cpython-36.pyc File 48508 bytes April 17 2024 17:19:45.
filelist.cpython-36.opt-1.pyc File 3372 bytes April 17 2024 17:19:40.
filelist.cpython-36.opt-2.pyc File 3331 bytes April 17 2024 17:19:27.
filelist.cpython-36.pyc File 3398 bytes April 17 2024 17:19:45.
grep.cpython-36.opt-1.pyc File 6753 bytes April 17 2024 17:19:40.
grep.cpython-36.opt-2.pyc File 4904 bytes April 17 2024 17:19:27.
grep.cpython-36.pyc File 6753 bytes April 17 2024 17:19:45.
help.cpython-36.opt-1.pyc File 10289 bytes April 17 2024 17:19:40.
help.cpython-36.opt-2.pyc File 7549 bytes April 17 2024 17:19:27.
help.cpython-36.pyc File 10289 bytes April 17 2024 17:19:45.
help_about.cpython-36.opt-1.pyc File 7423 bytes April 17 2024 17:19:40.
help_about.cpython-36.opt-2.pyc File 6293 bytes April 17 2024 17:19:27.
help_about.cpython-36.pyc File 7423 bytes April 17 2024 17:19:45.
history.cpython-36.opt-1.pyc File 3397 bytes April 17 2024 17:19:40.
history.cpython-36.opt-2.pyc File 2164 bytes April 17 2024 17:19:27.
history.cpython-36.pyc File 3397 bytes April 17 2024 17:19:45.
hyperparser.cpython-36.opt-1.pyc File 6778 bytes April 17 2024 17:19:40.
hyperparser.cpython-36.opt-2.pyc File 5463 bytes April 17 2024 17:19:27.
hyperparser.cpython-36.pyc File 6778 bytes April 17 2024 17:19:45.
idle.cpython-36.opt-1.pyc File 335 bytes April 17 2024 17:19:40.
idle.cpython-36.opt-2.pyc File 327 bytes April 17 2024 17:19:27.
idle.cpython-36.pyc File 335 bytes April 17 2024 17:19:45.
iomenu.cpython-36.opt-1.pyc File 13772 bytes April 17 2024 17:19:40.
iomenu.cpython-36.opt-2.pyc File 13344 bytes April 17 2024 17:19:27.
iomenu.cpython-36.pyc File 13772 bytes April 17 2024 17:19:44.
macosx.cpython-36.opt-1.pyc File 7610 bytes April 17 2024 17:19:40.
macosx.cpython-36.opt-2.pyc File 5420 bytes April 17 2024 17:19:27.
macosx.cpython-36.pyc File 7610 bytes April 17 2024 17:19:44.
mainmenu.cpython-36.opt-1.pyc File 3806 bytes April 17 2024 17:19:40.
mainmenu.cpython-36.opt-2.pyc File 3327 bytes April 17 2024 17:19:27.
mainmenu.cpython-36.pyc File 3806 bytes April 17 2024 17:19:45.
multicall.cpython-36.opt-1.pyc File 15302 bytes April 17 2024 17:19:40.
multicall.cpython-36.opt-2.pyc File 12929 bytes April 17 2024 17:19:27.
multicall.cpython-36.pyc File 15359 bytes April 17 2024 17:19:45.
outwin.cpython-36.opt-1.pyc File 6120 bytes April 17 2024 17:19:40.
outwin.cpython-36.opt-2.pyc File 4428 bytes April 17 2024 17:19:27.
outwin.cpython-36.pyc File 6120 bytes April 17 2024 17:19:44.
paragraph.cpython-36.opt-1.pyc File 5940 bytes April 17 2024 17:19:40.
paragraph.cpython-36.opt-2.pyc File 4049 bytes April 17 2024 17:19:27.
paragraph.cpython-36.pyc File 5940 bytes April 17 2024 17:19:45.
parenmatch.cpython-36.opt-1.pyc File 6382 bytes April 17 2024 17:19:40.
parenmatch.cpython-36.opt-2.pyc File 4828 bytes April 17 2024 17:19:27.
parenmatch.cpython-36.pyc File 6382 bytes April 17 2024 17:19:45.
pathbrowser.cpython-36.opt-1.pyc File 3744 bytes April 17 2024 17:19:40.
pathbrowser.cpython-36.opt-2.pyc File 3595 bytes April 17 2024 17:19:27.
pathbrowser.cpython-36.pyc File 3744 bytes April 17 2024 17:19:45.
percolator.cpython-36.opt-1.pyc File 3512 bytes April 17 2024 17:19:40.
percolator.cpython-36.opt-2.pyc File 3504 bytes April 17 2024 17:19:27.
percolator.cpython-36.pyc File 3650 bytes April 17 2024 17:19:45.
pyparse.cpython-36.opt-1.pyc File 11674 bytes April 17 2024 17:19:40.
pyparse.cpython-36.opt-2.pyc File 8086 bytes April 17 2024 17:19:27.
pyparse.cpython-36.pyc File 12037 bytes April 17 2024 17:19:45.
pyshell.cpython-36.opt-1.pyc File 42727 bytes April 17 2024 17:19:40.
pyshell.cpython-36.opt-2.pyc File 40177 bytes April 17 2024 17:19:27.
pyshell.cpython-36.pyc File 42850 bytes April 17 2024 17:19:45.
query.cpython-36.opt-1.pyc File 10433 bytes April 17 2024 17:19:40.
query.cpython-36.opt-2.pyc File 8301 bytes April 17 2024 17:19:27.
query.cpython-36.pyc File 10433 bytes April 17 2024 17:19:45.
redirector.cpython-36.opt-1.pyc File 6759 bytes April 17 2024 17:19:40.
redirector.cpython-36.opt-2.pyc File 3319 bytes April 17 2024 17:19:27.
redirector.cpython-36.pyc File 6759 bytes April 17 2024 17:19:45.
replace.cpython-36.opt-1.pyc File 7083 bytes April 17 2024 17:19:40.
replace.cpython-36.opt-2.pyc File 6425 bytes April 17 2024 17:19:27.
replace.cpython-36.pyc File 7083 bytes April 17 2024 17:19:45.
rpc.cpython-36.opt-1.pyc File 19558 bytes April 17 2024 17:19:40.
rpc.cpython-36.opt-2.pyc File 16004 bytes April 17 2024 17:19:27.
rpc.cpython-36.pyc File 19645 bytes April 17 2024 17:19:45.
rstrip.cpython-36.opt-1.pyc File 1076 bytes April 17 2024 17:19:40.
rstrip.cpython-36.opt-2.pyc File 990 bytes April 17 2024 17:19:27.
rstrip.cpython-36.pyc File 1076 bytes April 17 2024 17:19:45.
run.cpython-36.opt-1.pyc File 15345 bytes April 17 2024 17:19:40.
run.cpython-36.opt-2.pyc File 13316 bytes April 17 2024 17:19:27.
run.cpython-36.pyc File 15388 bytes April 17 2024 17:19:45.
runscript.cpython-36.opt-1.pyc File 6478 bytes April 17 2024 17:19:40.
runscript.cpython-36.opt-2.pyc File 5269 bytes April 17 2024 17:19:27.
runscript.cpython-36.pyc File 6478 bytes April 17 2024 17:19:44.
scrolledlist.cpython-36.opt-1.pyc File 5385 bytes April 17 2024 17:19:40.
scrolledlist.cpython-36.opt-2.pyc File 5377 bytes April 17 2024 17:19:27.
scrolledlist.cpython-36.pyc File 5385 bytes April 17 2024 17:19:45.
search.cpython-36.opt-1.pyc File 3541 bytes April 17 2024 17:19:40.
search.cpython-36.opt-2.pyc File 3281 bytes April 17 2024 17:19:27.
search.cpython-36.pyc File 3541 bytes April 17 2024 17:19:45.
searchbase.cpython-36.opt-1.pyc File 7977 bytes April 17 2024 17:19:40.
searchbase.cpython-36.opt-2.pyc File 5209 bytes April 17 2024 17:19:27.
searchbase.cpython-36.pyc File 7977 bytes April 17 2024 17:19:45.
searchengine.cpython-36.opt-1.pyc File 6840 bytes April 17 2024 17:19:40.
searchengine.cpython-36.opt-2.pyc File 5182 bytes April 17 2024 17:19:27.
searchengine.cpython-36.pyc File 6840 bytes April 17 2024 17:19:44.
squeezer.cpython-36.opt-1.pyc File 9907 bytes April 17 2024 17:19:40.
squeezer.cpython-36.opt-2.pyc File 6713 bytes April 17 2024 17:19:27.
squeezer.cpython-36.pyc File 9944 bytes April 17 2024 17:19:45.
stackviewer.cpython-36.opt-1.pyc File 5055 bytes April 17 2024 17:19:40.
stackviewer.cpython-36.opt-2.pyc File 5047 bytes April 17 2024 17:19:27.
stackviewer.cpython-36.pyc File 5055 bytes April 17 2024 17:19:44.
statusbar.cpython-36.opt-1.pyc File 1945 bytes April 17 2024 17:19:40.
statusbar.cpython-36.opt-2.pyc File 1937 bytes April 17 2024 17:19:27.
statusbar.cpython-36.pyc File 1945 bytes April 17 2024 17:19:45.
textview.cpython-36.opt-1.pyc File 6437 bytes April 17 2024 17:19:40.
textview.cpython-36.opt-2.pyc File 4856 bytes April 17 2024 17:19:27.
textview.cpython-36.pyc File 6437 bytes April 17 2024 17:19:45.
tooltip.cpython-36.opt-1.pyc File 6566 bytes April 17 2024 17:19:40.
tooltip.cpython-36.opt-2.pyc File 4936 bytes April 17 2024 17:19:27.
tooltip.cpython-36.pyc File 6566 bytes April 17 2024 17:19:45.
tree.cpython-36.opt-1.pyc File 14276 bytes April 17 2024 17:19:40.
tree.cpython-36.opt-2.pyc File 13495 bytes April 17 2024 17:19:27.
tree.cpython-36.pyc File 14276 bytes April 17 2024 17:19:45.
undo.cpython-36.opt-1.pyc File 10780 bytes April 17 2024 17:19:40.
undo.cpython-36.opt-2.pyc File 10772 bytes April 17 2024 17:19:27.
undo.cpython-36.pyc File 10780 bytes April 17 2024 17:19:44.
window.cpython-36.opt-1.pyc File 3156 bytes April 17 2024 17:19:40.
window.cpython-36.opt-2.pyc File 3148 bytes April 17 2024 17:19:27.
window.cpython-36.pyc File 3156 bytes April 17 2024 17:19:45.
zoomheight.cpython-36.opt-1.pyc File 1402 bytes April 17 2024 17:19:40.
zoomheight.cpython-36.opt-2.pyc File 1345 bytes April 17 2024 17:19:27.
zoomheight.cpython-36.pyc File 1402 bytes April 17 2024 17:19:45.
zzdummy.cpython-36.opt-1.pyc File 1206 bytes April 17 2024 17:19:40.
zzdummy.cpython-36.opt-2.pyc File 1130 bytes April 17 2024 17:19:27.
zzdummy.cpython-36.pyc File 1206 bytes April 17 2024 17:19:45.

Reading File: //opt/alt/python36/lib64/python3.6/idlelib/__pycache__//squeezer.cpython-36.pyc

3

� f�3�@s�dZddlZddlZddlmZddljZddl	m
Z
ddlmZddl
mZddlmZdd
d�ZGdd
�d
ej�ZGdd�d�Zej�edkr�ddlmZedddd�dS)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-cliking 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)�Font)�idleConf)�	view_text)�Hovertip)�macosx�P�c
Cs�d}d}d}x�tjd|�D]�}|j�|}||7}||7}||dkrT|d7}d}n4||dksdt�||||7}||kr�|d7}|}|d7}|dkrt|d|�\}}	||7}|	d}qW|t|�|7}|dkr�||d|7}n|d8}|S)z�Count 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]�
�	)�re�finditer�start�AssertionError�divmod�len)
�s�	linewidth�tabwidth�posZ	linecountZcurrent_column�m�numchars�lines�column�r�5/opt/alt/python36/lib64/python3.6/idlelib/squeezer.py�count_lines_with_wrappings2rc@sJeZdZdZdd�Zdd�Zddd�Zdd	d
�Zddd�ZdZ	dd�Z
dS)�ExpandingButtona�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	s��|_||_||_||_|j|_}|j|_}|jj|_d|j}t	j
j|||ddd�d}t||dd�|j
d|j�tj�r�|j
d	|j�n|j
d
|j�|j�fdd��d|_|j|j�dS)
NzSqueezed text (%d lines).z#FFFFC0z#FFFFE0)�textZ
backgroundZactivebackgroundz5Double-click to expand, right-click for more options.r)Zhover_delayz<Double-Button-1>z
<Button-2>z
<Button-3>cs�t|�t|�t|��S)N)�int)�offsetZlength)rrr�<lambda>}sz*ExpandingButton.__init__.<locals>.<lambda>)r�tags�
numoflines�squeezer�editwinr�per�bottom�	base_text�tk�Button�__init__rZbind�expandrZisAquaTk�context_menu_eventZselection_handle�is_dangerousZ
after_idle�set_is_dangerous)	�selfrr"r#r$r%rZbutton_textZbutton_tooltip_textr)rrr+as(


zExpandingButton.__init__csLd|jj��|jdkpDt|j�dkpDt�fdd�tjd|j�D��|_dS)N�2i�iP�c3s |]}t|jd���kVqdS)rN)r�group)�.0Z
line_match)�dangerous_line_lenrr�	<genexpr>�sz3ExpandingButton.set_is_dangerous.<locals>.<genexpr>z[^\n]+)	r�winfo_widthr#rr�anyrr
r.)r0r)r4rr/�s

z ExpandingButton.set_is_dangerousNcCs�|jdkr|j�|jrTtjddjddddg�|jt|j�ftj|j	d�}|sTd	S|j
j|j	j|�|j|j
�|j
j|�|jjj|�dS)
aAexpand event handler

        This inserts the original text in place of the button in the Text
        widget, removes the button and updates the Squeezer instance.

        If the original text is dangerously long, i.e. expanding it could
        cause a performance degradation, ask the user for confirmation.
        NzExpand huge output?z

z5The squeezed output is very long: %d lines, %d chars.z2Expanding it could make IDLE slow or unresponsive.z5It is recommended to view or copy the output instead.zReally expand?)�title�message�default�parent�break)r.r/�tkMessageBoxZaskokcancel�joinr#rrZCANCELrr(�insert�indexr"�deleter$�expandingbuttons�remove)r0�eventZconfirmrrrr,�s$	

zExpandingButton.expandcCs|j�|j|j�dS)zMcopy event handler

        Copy the original text to the clipboard.
        N)Zclipboard_clearZclipboard_appendr)r0rDrrr�copy�szExpandingButton.copycCst|jd|jddd�dS)z]view event handler

        View the original text in a separate text viewer window.
        zSqueezed Output ViewerFZnone)ZmodalZwrapN)rrr)r0rDrrr�view�szExpandingButton.viewrErFcCsf|jjdd|j|jf�tj|jdd�}x&|jD]\}}|j|t||�d�q2W|j	|j
|j�dS)Nr?z@%d,%dr)Ztearoff)�labelZcommandr<)rZmark_set�x�yr)ZMenu�rmenu_specsZadd_command�getattrZtk_popupZx_rootZy_root)r0rDZrmenurGZmethod_namerrrr-�sz"ExpandingButton.context_menu_event)N)N)N�rErE�rFrF)rLrM)�__name__�
__module__�__qualname__�__doc__r+r/r,rErFrJr-rrrrrVs
!



rc@s4eZdZdZedd��Zdd�Zdd�Zdd	�Zd
S)�Squeezerz�Replace long outputs in the shell with a simple button.

    This avoids IDLE's shell slowing down considerably, and even becoming
    completely unresponsive, when very long outputs are written.
    cCstjdddddd�|_dS)z!Load class variables from config.�main�PyShellzauto-squeeze-min-linesrr1)�typer:N)rZ	GetOption�auto_squeeze_min_lines)�clsrrr�reload�szSqueezer.reloadcsX|�_|j�_�|jj�_g�_ddlm}t||�rTf|j	f��fdd�	}||_	dS)aeInitialize settings for Squeezer.

        editwin is the shell's Editor window.
        self.text is the editor window text widget.
        self.base_test is the actual editor window Tk text widget, rather than
            EditorWindow's wrapper.
        self.expandingbuttons is the list of all buttons representing
            "squeezed" output.
        r)rTcs�|dkr|||�S�j|�}|�jkr0|||�St|||��}�jdtj��jd|ddd��jd��j��jdtj	��j
j|�dS)N�stdoutZiomark��)�window�padx�pady)�count_linesrVrZmark_gravityr)ZRIGHT�
window_createZsee�updateZLEFTrB�append)rr"�writer#�expandingbutton)r0rrr�mywrite�s





z"Squeezer.__init__.<locals>.mywriteN)
r%rr&r'r(rBZidlelib.pyshellrT�
isinstancerc)r0r%rTrer)r0rrr+�s


zSqueezer.__init__csh�jj�}�jjj�}|dt�fdd�d	D��8}t�jj�jjjd�d�}||jd�}t|||�S)
abCount the number of lines in a given text.

        Before calculation, the tab width and line length of the text are
        fetched, so that up-to-date values are used.

        Lines are counted as if the string was wrapped so that lines are never
        over linewidth characters long.

        Tabs are considered tabwidth characters long.
        �csg|]}t�jjj|���qSr)rr%r�cget)r3Zopt)r0rr�
<listcomp>sz(Squeezer.count_lines.<locals>.<listcomp>�borderr]�font)�name�0)rjr])	r%Zget_tk_tabwidthrr6�sumrrhZmeasurer)r0rrrrkr)r0rr_s
zSqueezer.count_linesc
Cs|jjtj�}x$dD]}||krPqW|jj�dS|jj|tjd�\}}|jj||�}t|�dkr�|ddkr�|jjd|�}|d	d�}|j	j
||�|j|�}t||||�}|jj
||d
dd�t|j�}	x0|	dko�|jj|j|	dd
|��r|	d8}	q�W|jj|	|�dS)z�squeeze-current-text event handler

        Squeeze the block of text inside which contains the "insert" cursor.

        If the insert cursor is not in a squeezable block of text, give the
        user a small warning and do nothing.
        rY�stderrr<z+1crr	r
z%s-1cNrZr[)r\r]r^�>)rYro���rq)r�	tag_namesr)ZINSERTZbellZ
tag_prevrange�getrr@r(rAr_rr`rBZcomparer?)
r0rDrrZtag_namer�endrr#rd�irrr�squeeze_current_text_event*s,	






z#Squeezer.squeeze_current_text_eventN)	rNrOrPrQ�classmethodrXr+r_rvrrrrrR�s
4rR�__main__)rSzidlelib.idle_test.test_squeezerrgF)�	verbosity�exit)rr)rQrZtkinterr)Ztkinter.fontrZtkinter.messageboxZ
messageboxr=Zidlelib.configrZidlelib.textviewrZidlelib.tooltiprZidlelibrrr*rrRrXrNZunittestrSrrrr�<module>s 

9s

SILENT KILLER Tool