SILENT KILLERPanel

Current Path: > > opt > alt > python37 > lib64 > python3.7 > > 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/python37/lib64/python3.7//idlelib/__pycache__

NameTypeSizeLast ModifiedActions
__init__.cpython-37.opt-1.pyc File 513 bytes April 17 2024 17:36:09.
__init__.cpython-37.opt-2.pyc File 151 bytes April 17 2024 17:35:53.
__init__.cpython-37.pyc File 513 bytes April 17 2024 17:36:15.
__main__.cpython-37.opt-1.pyc File 274 bytes April 17 2024 17:36:09.
__main__.cpython-37.opt-2.pyc File 203 bytes April 17 2024 17:35:53.
__main__.cpython-37.pyc File 274 bytes April 17 2024 17:36:15.
autocomplete.cpython-37.opt-1.pyc File 6796 bytes April 17 2024 17:36:09.
autocomplete.cpython-37.opt-2.pyc File 5398 bytes April 17 2024 17:35:53.
autocomplete.cpython-37.pyc File 6796 bytes April 17 2024 17:36:15.
autocomplete_w.cpython-37.opt-1.pyc File 11032 bytes April 17 2024 17:36:09.
autocomplete_w.cpython-37.opt-2.pyc File 10274 bytes April 17 2024 17:35:53.
autocomplete_w.cpython-37.pyc File 11090 bytes April 17 2024 17:36:15.
autoexpand.cpython-37.opt-1.pyc File 2826 bytes April 17 2024 17:36:09.
autoexpand.cpython-37.opt-2.pyc File 2076 bytes April 17 2024 17:35:53.
autoexpand.cpython-37.pyc File 2826 bytes April 17 2024 17:36:15.
browser.cpython-37.opt-1.pyc File 9490 bytes April 17 2024 17:36:09.
browser.cpython-37.opt-2.pyc File 6823 bytes April 17 2024 17:35:53.
browser.cpython-37.pyc File 9490 bytes April 17 2024 17:36:15.
calltip.cpython-37.opt-1.pyc File 5572 bytes April 17 2024 17:36:09.
calltip.cpython-37.opt-2.pyc File 3951 bytes April 17 2024 17:35:53.
calltip.cpython-37.pyc File 5572 bytes April 17 2024 17:36:15.
calltip_w.cpython-37.opt-1.pyc File 6168 bytes April 17 2024 17:36:09.
calltip_w.cpython-37.opt-2.pyc File 5235 bytes April 17 2024 17:35:53.
calltip_w.cpython-37.pyc File 6168 bytes April 17 2024 17:36:15.
codecontext.cpython-37.opt-1.pyc File 8695 bytes April 17 2024 17:36:09.
codecontext.cpython-37.opt-2.pyc File 5700 bytes April 17 2024 17:35:53.
codecontext.cpython-37.pyc File 8730 bytes April 17 2024 17:36:15.
colorizer.cpython-37.opt-1.pyc File 10266 bytes April 17 2024 17:36:09.
colorizer.cpython-37.opt-2.pyc File 8172 bytes April 17 2024 17:35:53.
colorizer.cpython-37.pyc File 10266 bytes April 17 2024 17:36:15.
config.cpython-37.opt-1.pyc File 29872 bytes April 17 2024 17:36:09.
config.cpython-37.opt-2.pyc File 19952 bytes April 17 2024 17:35:53.
config.cpython-37.pyc File 29872 bytes April 17 2024 17:36:15.
config_key.cpython-37.opt-1.pyc File 11339 bytes April 17 2024 17:36:09.
config_key.cpython-37.opt-2.pyc File 9919 bytes April 17 2024 17:35:53.
config_key.cpython-37.pyc File 11339 bytes April 17 2024 17:36:15.
configdialog.cpython-37.opt-1.pyc File 78613 bytes April 17 2024 17:36:09.
configdialog.cpython-37.opt-2.pyc File 48456 bytes April 17 2024 17:35:53.
configdialog.cpython-37.pyc File 78613 bytes April 17 2024 17:36:15.
debugger.cpython-37.opt-1.pyc File 14219 bytes April 17 2024 17:36:09.
debugger.cpython-37.opt-2.pyc File 14068 bytes April 17 2024 17:35:53.
debugger.cpython-37.pyc File 14219 bytes April 17 2024 17:36:15.
debugger_r.cpython-37.opt-1.pyc File 13771 bytes April 17 2024 17:36:09.
debugger_r.cpython-37.opt-2.pyc File 11380 bytes April 17 2024 17:35:53.
debugger_r.cpython-37.pyc File 13897 bytes April 17 2024 17:36:15.
debugobj.cpython-37.opt-1.pyc File 5177 bytes April 17 2024 17:36:09.
debugobj.cpython-37.opt-2.pyc File 5177 bytes April 17 2024 17:35:53.
debugobj.cpython-37.pyc File 5177 bytes April 17 2024 17:36:15.
debugobj_r.cpython-37.opt-1.pyc File 2018 bytes April 17 2024 17:36:09.
debugobj_r.cpython-37.opt-2.pyc File 2018 bytes April 17 2024 17:35:53.
debugobj_r.cpython-37.pyc File 2018 bytes April 17 2024 17:36:15.
delegator.cpython-37.opt-1.pyc File 1280 bytes April 17 2024 17:36:09.
delegator.cpython-37.opt-2.pyc File 1180 bytes April 17 2024 17:35:53.
delegator.cpython-37.pyc File 1280 bytes April 17 2024 17:36:15.
dynoption.cpython-37.opt-1.pyc File 2291 bytes April 17 2024 17:36:09.
dynoption.cpython-37.opt-2.pyc File 1911 bytes April 17 2024 17:35:53.
dynoption.cpython-37.pyc File 2291 bytes April 17 2024 17:36:15.
editor.cpython-37.opt-1.pyc File 46605 bytes April 17 2024 17:36:09.
editor.cpython-37.opt-2.pyc File 44705 bytes April 17 2024 17:35:53.
editor.cpython-37.pyc File 46692 bytes April 17 2024 17:36:15.
filelist.cpython-37.opt-1.pyc File 3376 bytes April 17 2024 17:36:09.
filelist.cpython-37.opt-2.pyc File 3343 bytes April 17 2024 17:35:53.
filelist.cpython-37.pyc File 3402 bytes April 17 2024 17:36:15.
format.cpython-37.opt-1.pyc File 13440 bytes April 17 2024 17:36:09.
format.cpython-37.opt-2.pyc File 9717 bytes April 17 2024 17:35:53.
format.cpython-37.pyc File 13440 bytes April 17 2024 17:36:15.
grep.cpython-37.opt-1.pyc File 7791 bytes April 17 2024 17:36:09.
grep.cpython-37.opt-2.pyc File 5096 bytes April 17 2024 17:35:53.
grep.cpython-37.pyc File 7791 bytes April 17 2024 17:36:15.
help.cpython-37.opt-1.pyc File 10376 bytes April 17 2024 17:36:09.
help.cpython-37.opt-2.pyc File 7607 bytes April 17 2024 17:35:53.
help.cpython-37.pyc File 10418 bytes April 17 2024 17:36:15.
help_about.cpython-37.opt-1.pyc File 7337 bytes April 17 2024 17:36:09.
help_about.cpython-37.opt-2.pyc File 6215 bytes April 17 2024 17:35:53.
help_about.cpython-37.pyc File 7337 bytes April 17 2024 17:36:15.
history.cpython-37.opt-1.pyc File 3394 bytes April 17 2024 17:36:09.
history.cpython-37.opt-2.pyc File 2169 bytes April 17 2024 17:35:53.
history.cpython-37.pyc File 3394 bytes April 17 2024 17:36:15.
hyperparser.cpython-37.opt-1.pyc File 6749 bytes April 17 2024 17:36:09.
hyperparser.cpython-37.opt-2.pyc File 5442 bytes April 17 2024 17:35:53.
hyperparser.cpython-37.pyc File 6749 bytes April 17 2024 17:36:15.
idle.cpython-37.opt-1.pyc File 339 bytes April 17 2024 17:36:09.
idle.cpython-37.opt-2.pyc File 339 bytes April 17 2024 17:35:53.
idle.cpython-37.pyc File 339 bytes April 17 2024 17:36:15.
iomenu.cpython-37.opt-1.pyc File 13780 bytes April 17 2024 17:36:09.
iomenu.cpython-37.opt-2.pyc File 13312 bytes April 17 2024 17:35:53.
iomenu.cpython-37.pyc File 13780 bytes April 17 2024 17:36:15.
macosx.cpython-37.opt-1.pyc File 7594 bytes April 17 2024 17:36:09.
macosx.cpython-37.opt-2.pyc File 5412 bytes April 17 2024 17:35:53.
macosx.cpython-37.pyc File 7594 bytes April 17 2024 17:36:15.
mainmenu.cpython-37.opt-1.pyc File 3461 bytes April 17 2024 17:36:09.
mainmenu.cpython-37.opt-2.pyc File 2990 bytes April 17 2024 17:35:53.
mainmenu.cpython-37.pyc File 3461 bytes April 17 2024 17:36:15.
multicall.cpython-37.opt-1.pyc File 14937 bytes April 17 2024 17:36:09.
multicall.cpython-37.opt-2.pyc File 12572 bytes April 17 2024 17:35:53.
multicall.cpython-37.pyc File 14994 bytes April 17 2024 17:36:15.
outwin.cpython-37.opt-1.pyc File 6062 bytes April 17 2024 17:36:09.
outwin.cpython-37.opt-2.pyc File 4378 bytes April 17 2024 17:35:53.
outwin.cpython-37.pyc File 6062 bytes April 17 2024 17:36:15.
parenmatch.cpython-37.opt-1.pyc File 6334 bytes April 17 2024 17:36:09.
parenmatch.cpython-37.opt-2.pyc File 4788 bytes April 17 2024 17:35:53.
parenmatch.cpython-37.pyc File 6334 bytes April 17 2024 17:36:15.
pathbrowser.cpython-37.opt-1.pyc File 3743 bytes April 17 2024 17:36:09.
pathbrowser.cpython-37.opt-2.pyc File 3602 bytes April 17 2024 17:35:53.
pathbrowser.cpython-37.pyc File 3743 bytes April 17 2024 17:36:15.
percolator.cpython-37.opt-1.pyc File 3516 bytes April 17 2024 17:36:09.
percolator.cpython-37.opt-2.pyc File 3516 bytes April 17 2024 17:35:53.
percolator.cpython-37.pyc File 3654 bytes April 17 2024 17:36:15.
pyparse.cpython-37.opt-1.pyc File 11639 bytes April 17 2024 17:36:09.
pyparse.cpython-37.opt-2.pyc File 8060 bytes April 17 2024 17:35:53.
pyparse.cpython-37.pyc File 11988 bytes April 17 2024 17:36:15.
pyshell.cpython-37.opt-1.pyc File 42251 bytes April 17 2024 17:36:09.
pyshell.cpython-37.opt-2.pyc File 39523 bytes April 17 2024 17:35:53.
pyshell.cpython-37.pyc File 42381 bytes April 17 2024 17:36:15.
query.cpython-37.opt-1.pyc File 12815 bytes April 17 2024 17:36:09.
query.cpython-37.opt-2.pyc File 10093 bytes April 17 2024 17:35:53.
query.cpython-37.pyc File 12815 bytes April 17 2024 17:36:15.
redirector.cpython-37.opt-1.pyc File 6763 bytes April 17 2024 17:36:09.
redirector.cpython-37.opt-2.pyc File 3331 bytes April 17 2024 17:35:53.
redirector.cpython-37.pyc File 6763 bytes April 17 2024 17:36:15.
replace.cpython-37.opt-1.pyc File 9358 bytes April 17 2024 17:36:09.
replace.cpython-37.opt-2.pyc File 6516 bytes April 17 2024 17:35:53.
replace.cpython-37.pyc File 9358 bytes April 17 2024 17:36:15.
rpc.cpython-37.opt-1.pyc File 19604 bytes April 17 2024 17:36:09.
rpc.cpython-37.opt-2.pyc File 16058 bytes April 17 2024 17:35:53.
rpc.cpython-37.pyc File 19691 bytes April 17 2024 17:36:15.
run.cpython-37.opt-1.pyc File 17677 bytes April 17 2024 17:36:09.
run.cpython-37.opt-2.pyc File 15202 bytes April 17 2024 17:35:53.
run.cpython-37.pyc File 17725 bytes April 17 2024 17:36:15.
runscript.cpython-37.opt-1.pyc File 7070 bytes April 17 2024 17:36:09.
runscript.cpython-37.opt-2.pyc File 5836 bytes April 17 2024 17:35:53.
runscript.cpython-37.pyc File 7070 bytes April 17 2024 17:36:15.
scrolledlist.cpython-37.opt-1.pyc File 5403 bytes April 17 2024 17:36:09.
scrolledlist.cpython-37.opt-2.pyc File 5403 bytes April 17 2024 17:35:53.
scrolledlist.cpython-37.pyc File 5403 bytes April 17 2024 17:36:15.
search.cpython-37.opt-1.pyc File 5931 bytes April 17 2024 17:36:09.
search.cpython-37.opt-2.pyc File 3439 bytes April 17 2024 17:35:53.
search.cpython-37.pyc File 5931 bytes April 17 2024 17:36:15.
searchbase.cpython-37.opt-1.pyc File 8037 bytes April 17 2024 17:36:09.
searchbase.cpython-37.opt-2.pyc File 5277 bytes April 17 2024 17:35:53.
searchbase.cpython-37.pyc File 8037 bytes April 17 2024 17:36:15.
searchengine.cpython-37.opt-1.pyc File 6841 bytes April 17 2024 17:36:09.
searchengine.cpython-37.opt-2.pyc File 5191 bytes April 17 2024 17:35:53.
searchengine.cpython-37.pyc File 6841 bytes April 17 2024 17:36:15.
sidebar.cpython-37.opt-1.pyc File 10987 bytes April 17 2024 17:36:09.
sidebar.cpython-37.opt-2.pyc File 9539 bytes April 17 2024 17:35:53.
sidebar.cpython-37.pyc File 10987 bytes April 17 2024 17:36:15.
squeezer.cpython-37.opt-1.pyc File 9520 bytes April 17 2024 17:36:09.
squeezer.cpython-37.opt-2.pyc File 6333 bytes April 17 2024 17:35:53.
squeezer.cpython-37.pyc File 9557 bytes April 17 2024 17:36:15.
stackviewer.cpython-37.opt-1.pyc File 5054 bytes April 17 2024 17:36:09.
stackviewer.cpython-37.opt-2.pyc File 5054 bytes April 17 2024 17:35:53.
stackviewer.cpython-37.pyc File 5054 bytes April 17 2024 17:36:15.
statusbar.cpython-37.opt-1.pyc File 1949 bytes April 17 2024 17:36:09.
statusbar.cpython-37.opt-2.pyc File 1949 bytes April 17 2024 17:35:53.
statusbar.cpython-37.pyc File 1949 bytes April 17 2024 17:36:15.
textview.cpython-37.opt-1.pyc File 7065 bytes April 17 2024 17:36:09.
textview.cpython-37.opt-2.pyc File 4909 bytes April 17 2024 17:35:53.
textview.cpython-37.pyc File 7065 bytes April 17 2024 17:36:15.
tooltip.cpython-37.opt-1.pyc File 6570 bytes April 17 2024 17:36:09.
tooltip.cpython-37.opt-2.pyc File 4948 bytes April 17 2024 17:35:53.
tooltip.cpython-37.pyc File 6570 bytes April 17 2024 17:36:15.
tree.cpython-37.opt-1.pyc File 15696 bytes April 17 2024 17:36:09.
tree.cpython-37.opt-2.pyc File 14352 bytes April 17 2024 17:35:53.
tree.cpython-37.pyc File 15696 bytes April 17 2024 17:36:15.
undo.cpython-37.opt-1.pyc File 10769 bytes April 17 2024 17:36:09.
undo.cpython-37.opt-2.pyc File 10769 bytes April 17 2024 17:35:53.
undo.cpython-37.pyc File 10769 bytes April 17 2024 17:36:15.
window.cpython-37.opt-1.pyc File 3195 bytes April 17 2024 17:36:09.
window.cpython-37.opt-2.pyc File 3195 bytes April 17 2024 17:35:53.
window.cpython-37.pyc File 3195 bytes April 17 2024 17:36:15.
zoomheight.cpython-37.opt-1.pyc File 2798 bytes April 17 2024 17:36:09.
zoomheight.cpython-37.opt-2.pyc File 2749 bytes April 17 2024 17:35:53.
zoomheight.cpython-37.pyc File 2798 bytes April 17 2024 17:36:15.
zzdummy.cpython-37.opt-1.pyc File 1210 bytes April 17 2024 17:36:09.
zzdummy.cpython-37.opt-2.pyc File 1142 bytes April 17 2024 17:35:53.
zzdummy.cpython-37.pyc File 1210 bytes April 17 2024 17:36:15.

Reading File: //opt/alt/python37/lib64/python3.7//idlelib/__pycache__/format.cpython-37.opt-1.pyc

B

� f�=�@s�dZddlZddlmZddlmZddlmZGdd�d�Ze�	�dd	�Z
d
d�Zdd
�Zdd�Z
dd�Zdd�Ze�d�Zdd�ZGdd�d�ZGdd�d�ZGdd�d�Zedkr�ddlmZedd d!d"�dS)#z�Format all or a selected region (line slice) of text.

Region formatting options: paragraph, comment block, indent, deindent,
comment, uncomment, tabify, and untabify.

File renamed from paragraph.py with functions added from editor.py.
�N)�askyesno)�
askinteger)�idleConfc@s6eZdZdZdd�Zedd��Zdd�Zdd	d
�ZdS)�FormatParagraphaFormat a paragraph, comment block, or selection to a max width.

    Does basic, standard text formatting, and also understands Python
    comment blocks. Thus, for editing Python source code, this
    extension is really only suitable for reformatting these comment
    blocks or triple-quoted strings.

    Known problems with comment reformatting:
    * If there is a selection marked, and the first line of the
      selection is not complete, the block will probably not be detected
      as comments, and will have the normal "text formatting" rules
      applied.
    * If a comment block has leading whitespace that mixes tabs and
      spaces, they will not be considered part of the same block.
    * Fancy comments, like this bulleted list, aren't handled :-)
    cCs
||_dS)N)�editwin)�selfr�r�3/opt/alt/python37/lib64/python3.7/idlelib/format.py�__init__szFormatParagraph.__init__cCstjdddddd�|_dS)N�
extensionsrz	max-width�int�H)�type�default)rZ	GetOption�	max_width)�clsrrr	�reload"szFormatParagraph.reloadcCs
d|_dS)N)r)rrrr	�close'szFormatParagraph.closeNc	Cs�|dkr|jn|}|jj}|j��\}}|rF|rF|�||�}t|�}nt||�d��\}}}}|rpt|||�}n
t	||�}|�
ddd�||kr�|�d|�|��|�
||�|�||�|��n|�d|�|�d�dS)a�Formats paragraph to a max width specified in idleConf.

        If text is selected, format_paragraph_event will start breaking lines
        at the max width, starting from the beginning selection.

        If no text is selected, format_paragraph_event uses the current
        cursor location to determine the paragraph (lines of text surrounded
        by blank lines) and formats it.

        The length limit parameter is for testing with a known value.
        N�insert�selz1.0�end�break)rr�text�get_selection_indices�get�get_comment_header�find_paragraph�index�reformat_comment�reformat_paragraph�
tag_remove�mark_set�undo_block_start�deleter�undo_block_stopZsee)	r�event�limitr�first�last�data�comment_header�newdatarrr	�format_paragraph_event*s(



z&FormatParagraph.format_paragraph_event)N)	�__name__�
__module__�__qualname__�__doc__r
�classmethodrrr,rrrr	rs
rc
CsFtt|�d��\}}|�d|d|�}x:|�d|dd�rbt|�rb|d}|�d|d|�}q*W|}t|�}t|�}x<t|�|kr�t||d��s�|d}|�d|d|�}qzWd|}|d}|�d|d|�}xJ|dk�r$t|�|k�r$t||d���s$|d}|�d|d|�}q�Wd|d}	|	|||�|	|�fS)	z�Returns the start/stop indices enclosing the paragraph that mark is in.

    Also returns the comment format string, if any, and paragraph of text
    between the start/stop indices.
    �.z%d.0z%d.end�<r�Nr)�mapr�splitrZcompare�is_all_whiter�len)
rZmark�lineno�col�lineZfirst_linenor*Zcomment_header_lenr(r'rrr	rSs,rcCs�|�d�}d}t|�}x ||kr6t||�r6|d}qW||krD|St||�}|d|kr~t||d�s~t||d�}n|}|d|�}|}x�||k�rTt||��sTt�d||�}	x�tdt|	�d�D]x}
|	|
}|s�q�t||���|k�r||k�r|�|���|}||d}|
dt|	�kr�|	|
ddkr�|d}q�W|d}q�W|�|���|�	||d��d�
|�S)z3Return data reformatted to specified width (limit).�
rr4Nz(\s+)�� )r6r8r7�
get_indent�re�range�
expandtabs�append�rstrip�extend�join)r)r&�lines�i�nZindent1Zindent2�new�partialZwords�jZwordrrr	rxs<

 rcs�t���d��fdd�|�d�D��}t|t��d�}t||�}|�d�}d}|dshd}|dd�}d��fdd�|D��|S)	z?Return data reformatted to specified width with comment header.r<c3s|]}|�d�VqdS)Nr)�.0r;)�lcrr	�	<genexpr>�sz#reformat_comment.<locals>.<genexpr>�����Nc3s|]}�|VqdS)Nr)rMr;)r*rr	rO�s)r8rFr6�maxr)r)r&r*Zformat_widthr+Zblock_suffixr)r*rNr	r�s

rcCst�d|�dk	S)z/Return True if line is empty or all whitespace.z^\s*$N)r@�match)r;rrr	r7�sr7cCst�d|���S)z/Return the initial space or tab indent of line.z	^([ \t]*))r@rT�group)r;rrr	r?�sr?cCs"t�d|�}|dkrdS|�d�S)aReturn string with leading whitespace and '#' from line or ''.

    A null return indicates that the line is not a comment line. A non-
    null return, such as '    #', will be used to find the other lines of
    a comment block with the same  indent.
    z^([ \t]*#*)NrQr4)r@rTrU)r;�mrrr	r�srz[ \t]*cCs$t�|�}|��t|���|��fS)z�Return a line's indentation as (# chars, effective # of spaces).

    The effective # of spaces is the length after properly "expanding"
    the tabs into spaces, as done by str.expandtabs(tabwidth).
    )�_line_indent_rerTrr8rUrB)r;�tabwidthrVrrr	�get_line_indent�s
rYc@sleZdZdZdd�Zdd�Zdd�Zdd	d
�Zddd�Zdd
d�Z	ddd�Z
ddd�Zddd�Zdd�Z
dS)�FormatRegionzFormat selected text (region).cCs
||_dS)N)r)rrrrr	r
�szFormatRegion.__init__cCsr|jj}|j��\}}|r<|r<|�|d�}|�|d�}n|�d�}|�d�}|�||�}|�d�}||||fS)aqReturn line information about the selected text region.

        If text is selected, the first and last indices will be
        for the selection.  If there is no text selected, the
        indices will be the current cursor location.

        Return a tuple containing (first index, last index,
            string representation of text, list of text lines).
        z
 linestartz-1c lineend +1czinsert linestartzinsert lineend +1cr<)rrrrrr6)rrr'r(�head�tail�charsrGrrr	�
get_region�s



zFormatRegion.get_regioncCsz|jj}d�|�}||kr&|��dS|�ddd�|�d|�|��|�||�|�||�|�	�|�
d|d�dS)aaReplace the text between the given indices.

        Args:
            head: Starting index of text to replace.
            tail: Ending index of text to replace.
            chars: Expected to be string of current text
                between head and tail.
            lines: List of new lines to insert between head
                and tail.
        r<Nrz1.0rr)rrrFZbellr r!r"r#rr$Ztag_add)rr[r\r]rGr�newcharsrrr	�
set_region�s
zFormatRegion.set_regionNc
Cs�|��\}}}}xZtt|��D]J}||}|rt||jj�\}}	|	|jj}	|j�|	�||d�||<qW|�||||�dS)z$Indent region by indentwidth spaces.Nr)	r^rAr8rYrrX�indentwidth�_make_blanksr`)
rr%r[r\r]rG�posr;�raw�	effectiverrr	�indent_region_events z FormatRegion.indent_region_eventc
Cs�|��\}}}}x`tt|��D]P}||}|rt||jj�\}}	t|	|jjd�}	|j�|	�||d�||<qW|�	||||�dS)z$Dedent region by indentwidth spaces.rNr)
r^rAr8rYrrXrSrarbr`)
rr%r[r\r]rGrcr;rdrerrr	�dedent_region_events z FormatRegion.dedent_region_eventcCsR|��\}}}}x,tt|�d�D]}||}d|||<q"W|�||||�dS)zrComment out each line in region.

        ## is appended to the beginning of each line to comment it out.
        r4z##r)r^rAr8r`)rr%r[r\r]rGrcr;rrr	�comment_region_event sz!FormatRegion.comment_region_eventcCs�|��\}}}}xdtt|��D]T}||}|s0q|dd�dkrN|dd�}n|dd�dkrj|dd�}|||<qW|�||||�dS)z�Uncomment each line in region.

        Remove ## or # in the first positions of a line.  If the comment
        is not in the beginning position, this command will have no effect.
        Nr=z##r4�#r)r^rAr8r`)rr%r[r\r]rGrcr;rrr	�uncomment_region_event,sz#FormatRegion.uncomment_region_eventc
Cs�|��\}}}}|��}|dkr$dSx\tt|��D]L}||}|r2t||�\}	}
t|
|�\}}d|d|||	d�||<q2W|�||||�dS)z@Convert leading spaces to tabs for each line in selected region.N�	r>r)r^�_asktabwidthrAr8rY�divmodr`)
rr%r[r\r]rGrXrcr;rdreZntabsZnspacesrrr	�tabify_region_event?s$z FormatRegion.tabify_region_eventcCs`|��\}}}}|��}|dkr$dSx&tt|��D]}||�|�||<q2W|�||||�dS)z.Expand tabs to spaces for each line in region.Nr)r^rlrAr8rBr`)rr%r[r\r]rGrXrcrrr	�untabify_region_eventNsz"FormatRegion.untabify_region_eventcCstdd|jj|jjddd�S)zReturn value for tab width.z	Tab widthzColumns per tab? (2-16)r=�)�parent�initialvalue�minvalue�maxvalue)rrrra)rrrr	rlYszFormatRegion._asktabwidth)N)N)N)N)N)N)r-r.r/r0r
r^r`rfrgrhrjrnrorlrrrr	rZ�s





rZc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�IndentszChange future indents.cCs
||_dS)N)r)rrrrr	r
gszIndents.__init__cCsJ|j}|j}tddd|dd|dd|jd�rF||_d	|_d
S)NzToggle tabsz
Turn tabs )ZonZoffz?
Indent width )zwill bez
remains atz 8.z!
 Note: a tab is always 8 columns)rq�r)r�usetabsrrra)rr%rrwrrr	�toggle_tabs_eventjs
zIndents.toggle_tabs_eventcCs<|j}tdd|j|jddd�}|r8||jkr8|js8||_dS)NzIndent widthz6New indent width (2-16)
(Always use 8 when using tabs)r=rp)rqrrrsrtr)rrrrarw)rr%rrJrrr	�change_indentwidth_eventzsz Indents.change_indentwidth_eventN)r-r.r/r0r
rxryrrrr	rudsruc@seZdZdd�Zddd�ZdS)�RstripcCs
||_dS)N)r)rrrrr	r
�szRstrip.__init__Nc	Cs�|jj}|jj}|��tt|�d���}xZtd|�D]L}|�d|d|�}t	|�}t	|�
��}||kr6|�d||fd|�q6W|�d�dkr�t|jd�s�x*|�d	�d
kr�|�d�dkr�|�d�q�W|�
�dS)Nrr4z%i.0z%i.endz%i.%izend-2cr<Zinterpzend-1cz1.0zend-3c)rr�undor"r�floatrrArr8rDr#�hasattrr$)	rr%rr{Zend_lineZcurZtxtrdZcutrrr	�	do_rstrip�s zRstrip.do_rstrip)N)r-r.r/r
r~rrrr	rz�srz�__main__)�mainzidlelib.idle_test.test_formatr=F)�	verbosity�exit)r0r@Ztkinter.messageboxrZtkinter.simpledialogrZidlelib.configrrrrrrr7r?r�compilerWrYrZrurzr-Zunittestr�rrrr	�<module>s*C%$

$ 

SILENT KILLER Tool