Psyduck - 可達鴨 之 鴨力山大2


Server : LiteSpeed
System : Linux premium217.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : alloknri ( 880)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /opt/alt/python36/lib64/python3.6/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python36/lib64/python3.6/idlelib/__pycache__/paragraph.cpython-36.pyc
3

� f��@s�dZddlZddlmZGdd�d�Zej�dd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zedkr�ddl
mZedddd�dS)a�Format 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 :-)
�N)�idleConfc@s2eZdZdd�Zedd��Zdd�Zd
dd	�ZdS)�FormatParagraphcCs
||_dS)N)�editwin)�selfr�r�6/opt/alt/python36/lib64/python3.6/idlelib/paragraph.py�__init__szFormatParagraph.__init__cCstjdddddd�|_dS)N�
extensionsrz	max-width�int�H)�type�default)rZ	GetOption�	max_width)�clsrrr�reloadszFormatParagraph.reloadcCs
d|_dS)N)r)rrrr�close szFormatParagraph.closeNc	Cs�|dkr|jn|}|jj}|jj�\}}|rF|rF|j||�}t|�}nt||jd��\}}}}|rpt|||�}n
t	||�}|j
ddd�||kr�|jd|�|j�|j
||�|j||�|j�n|jd|�|jd�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�insertZselz1.0�end�break)rr�textZget_selection_indices�get�get_comment_header�find_paragraph�index�reformat_comment�reformat_paragraphZ
tag_removeZmark_setZundo_block_start�deleterZundo_block_stopZsee)	rZevent�limitr�first�last�data�comment_header�newdatarrr�format_paragraph_event#s(



z&FormatParagraph.format_paragraph_event)N)�__name__�
__module__�__qualname__r�classmethodrrr#rrrrrsrc
CsJtt|jd��\}}|jd|d|�}x:|jd|dd�rbt|�rb|d}|jd|d|�}q*W|}t|�}t|�}x>t|�|kr�t||d��r�|d}|jd|d|�}qzWd|}|d}|jd|d|�}xL|dk�r(t|�|k�r(t||d���r(|d}|jd|d|�}q�Wd|d}	|	|||j|	|�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_lenrrrrrrLs,rcCs�|jd�}d}t|�}x ||kr6t||�r6|d}qW||krD|St||�}|d|kr�t||d�r�t||d�}n|}|d|�}|}x�||ko�t||��rTtjd||�}	x�tdt|	�d�D]v}
|	|
}|s�q�t||j��|ko�||k�r|j|j��|}||d}|
dt|	�kr�|	|
ddkr�|d}q�W|d}q�W|j|j��|j	||d��dj
|�S)z3Return data reformatted to specified width (limit).�
rr*Nz(\s+)�� )r,r.r-�
get_indent�re�range�
expandtabs�append�rstrip�extend�join)r r�lines�i�nZindent1Zindent2�new�partialZwords�jZwordrrrrqs<

 rcs�t���dj�fdd�|jd�D��}t|t��d�}t||�}|jd�}d}|d	shd}|dd
�}dj�fdd�|D��|S)z?Return data reformatted to specified width with comment header.r2c3s|]}|�d�VqdS)Nr)�.0r1)�lcrr�	<genexpr>�sz#reformat_comment.<locals>.<genexpr>��r*Nc3s|]}�|VqdS)Nr)rCr1)r!rrrE�s���rH)r.r<r,�maxr)r rr!Zformat_widthr"Zblock_suffixr)r!rDrr�s

rcCstjd|�dk	S)z/Return True if line is empty or all whitespace.z^\s*$N)r6�match)r1rrrr-�sr-cCstjd|�j�S)z/Return the initial space or tab indent of line.z	^([ \t]*))r6rJ�group)r1rrrr5�sr5cCs"tjd|�}|dkrdS|jd�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]*#*)NrGr*)r6rJrK)r1�mrrrr�sr�__main__)�mainz idlelib.idle_test.test_paragraphr3F)�	verbosity�exit)�__doc__r6Zidlelib.configrrrrrrr-r5rr$ZunittestrNrrrr�<module>s4%$
Name
Size
Permissions
Options
__init__.cpython-36.opt-1.pyc
0.497 KB
-rw-r--r--
__init__.cpython-36.opt-2.pyc
0.136 KB
-rw-r--r--
__init__.cpython-36.pyc
0.497 KB
-rw-r--r--
__main__.cpython-36.opt-1.pyc
0.264 KB
-rw-r--r--
__main__.cpython-36.opt-2.pyc
0.187 KB
-rw-r--r--
__main__.cpython-36.pyc
0.264 KB
-rw-r--r--
_pyclbr.cpython-36.opt-1.pyc
10.183 KB
-rw-r--r--
_pyclbr.cpython-36.opt-2.pyc
6.651 KB
-rw-r--r--
_pyclbr.cpython-36.pyc
10.183 KB
-rw-r--r--
autocomplete.cpython-36.opt-1.pyc
7.022 KB
-rw-r--r--
autocomplete.cpython-36.opt-2.pyc
5.429 KB
-rw-r--r--
autocomplete.cpython-36.pyc
7.022 KB
-rw-r--r--
autocomplete_w.cpython-36.opt-1.pyc
10.808 KB
-rw-r--r--
autocomplete_w.cpython-36.opt-2.pyc
10.073 KB
-rw-r--r--
autocomplete_w.cpython-36.pyc
10.854 KB
-rw-r--r--
autoexpand.cpython-36.opt-1.pyc
2.76 KB
-rw-r--r--
autoexpand.cpython-36.opt-2.pyc
2.02 KB
-rw-r--r--
autoexpand.cpython-36.pyc
2.76 KB
-rw-r--r--
browser.cpython-36.opt-1.pyc
9.349 KB
-rw-r--r--
browser.cpython-36.opt-2.pyc
6.823 KB
-rw-r--r--
browser.cpython-36.pyc
9.349 KB
-rw-r--r--
calltip.cpython-36.opt-1.pyc
5.479 KB
-rw-r--r--
calltip.cpython-36.opt-2.pyc
3.888 KB
-rw-r--r--
calltip.cpython-36.pyc
5.479 KB
-rw-r--r--
calltip_w.cpython-36.opt-1.pyc
6.019 KB
-rw-r--r--
calltip_w.cpython-36.opt-2.pyc
5.1 KB
-rw-r--r--
calltip_w.cpython-36.pyc
6.019 KB
-rw-r--r--
codecontext.cpython-36.opt-1.pyc
7.956 KB
-rw-r--r--
codecontext.cpython-36.opt-2.pyc
5.036 KB
-rw-r--r--
codecontext.cpython-36.pyc
7.99 KB
-rw-r--r--
colorizer.cpython-36.opt-1.pyc
8.166 KB
-rw-r--r--
colorizer.cpython-36.opt-2.pyc
8.003 KB
-rw-r--r--
colorizer.cpython-36.pyc
8.166 KB
-rw-r--r--
config.cpython-36.opt-1.pyc
29.792 KB
-rw-r--r--
config.cpython-36.opt-2.pyc
19.848 KB
-rw-r--r--
config.cpython-36.pyc
29.792 KB
-rw-r--r--
config_key.cpython-36.opt-1.pyc
13.523 KB
-rw-r--r--
config_key.cpython-36.opt-2.pyc
12.474 KB
-rw-r--r--
config_key.cpython-36.pyc
13.523 KB
-rw-r--r--
configdialog.cpython-36.opt-1.pyc
75.717 KB
-rw-r--r--
configdialog.cpython-36.opt-2.pyc
46.642 KB
-rw-r--r--
configdialog.cpython-36.pyc
75.717 KB
-rw-r--r--
debugger.cpython-36.opt-1.pyc
13.886 KB
-rw-r--r--
debugger.cpython-36.opt-2.pyc
13.73 KB
-rw-r--r--
debugger.cpython-36.pyc
13.886 KB
-rw-r--r--
debugger_r.cpython-36.opt-1.pyc
13.444 KB
-rw-r--r--
debugger_r.cpython-36.opt-2.pyc
11.102 KB
-rw-r--r--
debugger_r.cpython-36.pyc
13.567 KB
-rw-r--r--
debugobj.cpython-36.opt-1.pyc
5.052 KB
-rw-r--r--
debugobj.cpython-36.opt-2.pyc
5.044 KB
-rw-r--r--
debugobj.cpython-36.pyc
5.052 KB
-rw-r--r--
debugobj_r.cpython-36.opt-1.pyc
1.962 KB
-rw-r--r--
debugobj_r.cpython-36.opt-2.pyc
1.954 KB
-rw-r--r--
debugobj_r.cpython-36.pyc
1.962 KB
-rw-r--r--
delegator.cpython-36.opt-1.pyc
1.246 KB
-rw-r--r--
delegator.cpython-36.opt-2.pyc
1.141 KB
-rw-r--r--
delegator.cpython-36.pyc
1.246 KB
-rw-r--r--
dynoption.cpython-36.opt-1.pyc
2.233 KB
-rw-r--r--
dynoption.cpython-36.opt-2.pyc
1.854 KB
-rw-r--r--
dynoption.cpython-36.pyc
2.233 KB
-rw-r--r--
editor.cpython-36.opt-1.pyc
47.286 KB
-rw-r--r--
editor.cpython-36.opt-2.pyc
45.666 KB
-rw-r--r--
editor.cpython-36.pyc
47.371 KB
-rw-r--r--
filelist.cpython-36.opt-1.pyc
3.293 KB
-rw-r--r--
filelist.cpython-36.opt-2.pyc
3.253 KB
-rw-r--r--
filelist.cpython-36.pyc
3.318 KB
-rw-r--r--
grep.cpython-36.opt-1.pyc
6.595 KB
-rw-r--r--
grep.cpython-36.opt-2.pyc
4.789 KB
-rw-r--r--
grep.cpython-36.pyc
6.595 KB
-rw-r--r--
help.cpython-36.opt-1.pyc
10.048 KB
-rw-r--r--
help.cpython-36.opt-2.pyc
7.372 KB
-rw-r--r--
help.cpython-36.pyc
10.048 KB
-rw-r--r--
help_about.cpython-36.opt-1.pyc
7.249 KB
-rw-r--r--
help_about.cpython-36.opt-2.pyc
6.146 KB
-rw-r--r--
help_about.cpython-36.pyc
7.249 KB
-rw-r--r--
history.cpython-36.opt-1.pyc
3.317 KB
-rw-r--r--
history.cpython-36.opt-2.pyc
2.113 KB
-rw-r--r--
history.cpython-36.pyc
3.317 KB
-rw-r--r--
hyperparser.cpython-36.opt-1.pyc
6.619 KB
-rw-r--r--
hyperparser.cpython-36.opt-2.pyc
5.335 KB
-rw-r--r--
hyperparser.cpython-36.pyc
6.619 KB
-rw-r--r--
idle.cpython-36.opt-1.pyc
0.327 KB
-rw-r--r--
idle.cpython-36.opt-2.pyc
0.319 KB
-rw-r--r--
idle.cpython-36.pyc
0.327 KB
-rw-r--r--
iomenu.cpython-36.opt-1.pyc
13.449 KB
-rw-r--r--
iomenu.cpython-36.opt-2.pyc
13.031 KB
-rw-r--r--
iomenu.cpython-36.pyc
13.449 KB
-rw-r--r--
macosx.cpython-36.opt-1.pyc
7.432 KB
-rw-r--r--
macosx.cpython-36.opt-2.pyc
5.293 KB
-rw-r--r--
macosx.cpython-36.pyc
7.432 KB
-rw-r--r--
mainmenu.cpython-36.opt-1.pyc
3.717 KB
-rw-r--r--
mainmenu.cpython-36.opt-2.pyc
3.249 KB
-rw-r--r--
mainmenu.cpython-36.pyc
3.717 KB
-rw-r--r--
multicall.cpython-36.opt-1.pyc
14.943 KB
-rw-r--r--
multicall.cpython-36.opt-2.pyc
12.626 KB
-rw-r--r--
multicall.cpython-36.pyc
14.999 KB
-rw-r--r--
outwin.cpython-36.opt-1.pyc
5.977 KB
-rw-r--r--
outwin.cpython-36.opt-2.pyc
4.324 KB
-rw-r--r--
outwin.cpython-36.pyc
5.977 KB
-rw-r--r--
paragraph.cpython-36.opt-1.pyc
5.801 KB
-rw-r--r--
paragraph.cpython-36.opt-2.pyc
3.954 KB
-rw-r--r--
paragraph.cpython-36.pyc
5.801 KB
-rw-r--r--
parenmatch.cpython-36.opt-1.pyc
6.232 KB
-rw-r--r--
parenmatch.cpython-36.opt-2.pyc
4.715 KB
-rw-r--r--
parenmatch.cpython-36.pyc
6.232 KB
-rw-r--r--
pathbrowser.cpython-36.opt-1.pyc
3.656 KB
-rw-r--r--
pathbrowser.cpython-36.opt-2.pyc
3.511 KB
-rw-r--r--
pathbrowser.cpython-36.pyc
3.656 KB
-rw-r--r--
percolator.cpython-36.opt-1.pyc
3.43 KB
-rw-r--r--
percolator.cpython-36.opt-2.pyc
3.422 KB
-rw-r--r--
percolator.cpython-36.pyc
3.564 KB
-rw-r--r--
pyparse.cpython-36.opt-1.pyc
11.4 KB
-rw-r--r--
pyparse.cpython-36.opt-2.pyc
7.896 KB
-rw-r--r--
pyparse.cpython-36.pyc
11.755 KB
-rw-r--r--
pyshell.cpython-36.opt-1.pyc
41.726 KB
-rw-r--r--
pyshell.cpython-36.opt-2.pyc
39.235 KB
-rw-r--r--
pyshell.cpython-36.pyc
41.846 KB
-rw-r--r--
query.cpython-36.opt-1.pyc
10.188 KB
-rw-r--r--
query.cpython-36.opt-2.pyc
8.106 KB
-rw-r--r--
query.cpython-36.pyc
10.188 KB
-rw-r--r--
redirector.cpython-36.opt-1.pyc
6.601 KB
-rw-r--r--
redirector.cpython-36.opt-2.pyc
3.241 KB
-rw-r--r--
redirector.cpython-36.pyc
6.601 KB
-rw-r--r--
replace.cpython-36.opt-1.pyc
6.917 KB
-rw-r--r--
replace.cpython-36.opt-2.pyc
6.274 KB
-rw-r--r--
replace.cpython-36.pyc
6.917 KB
-rw-r--r--
rpc.cpython-36.opt-1.pyc
19.1 KB
-rw-r--r--
rpc.cpython-36.opt-2.pyc
15.629 KB
-rw-r--r--
rpc.cpython-36.pyc
19.185 KB
-rw-r--r--
rstrip.cpython-36.opt-1.pyc
1.051 KB
-rw-r--r--
rstrip.cpython-36.opt-2.pyc
0.967 KB
-rw-r--r--
rstrip.cpython-36.pyc
1.051 KB
-rw-r--r--
run.cpython-36.opt-1.pyc
14.985 KB
-rw-r--r--
run.cpython-36.opt-2.pyc
13.004 KB
-rw-r--r--
run.cpython-36.pyc
15.027 KB
-rw-r--r--
runscript.cpython-36.opt-1.pyc
6.326 KB
-rw-r--r--
runscript.cpython-36.opt-2.pyc
5.146 KB
-rw-r--r--
runscript.cpython-36.pyc
6.326 KB
-rw-r--r--
scrolledlist.cpython-36.opt-1.pyc
5.259 KB
-rw-r--r--
scrolledlist.cpython-36.opt-2.pyc
5.251 KB
-rw-r--r--
scrolledlist.cpython-36.pyc
5.259 KB
-rw-r--r--
search.cpython-36.opt-1.pyc
3.458 KB
-rw-r--r--
search.cpython-36.opt-2.pyc
3.204 KB
-rw-r--r--
search.cpython-36.pyc
3.458 KB
-rw-r--r--
searchbase.cpython-36.opt-1.pyc
7.79 KB
-rw-r--r--
searchbase.cpython-36.opt-2.pyc
5.087 KB
-rw-r--r--
searchbase.cpython-36.pyc
7.79 KB
-rw-r--r--
searchengine.cpython-36.opt-1.pyc
6.68 KB
-rw-r--r--
searchengine.cpython-36.opt-2.pyc
5.061 KB
-rw-r--r--
searchengine.cpython-36.pyc
6.68 KB
-rw-r--r--
squeezer.cpython-36.opt-1.pyc
9.675 KB
-rw-r--r--
squeezer.cpython-36.opt-2.pyc
6.556 KB
-rw-r--r--
squeezer.cpython-36.pyc
9.711 KB
-rw-r--r--
stackviewer.cpython-36.opt-1.pyc
4.937 KB
-rw-r--r--
stackviewer.cpython-36.opt-2.pyc
4.929 KB
-rw-r--r--
stackviewer.cpython-36.pyc
4.937 KB
-rw-r--r--
statusbar.cpython-36.opt-1.pyc
1.899 KB
-rw-r--r--
statusbar.cpython-36.opt-2.pyc
1.892 KB
-rw-r--r--
statusbar.cpython-36.pyc
1.899 KB
-rw-r--r--
textview.cpython-36.opt-1.pyc
6.286 KB
-rw-r--r--
textview.cpython-36.opt-2.pyc
4.742 KB
-rw-r--r--
textview.cpython-36.pyc
6.286 KB
-rw-r--r--
tooltip.cpython-36.opt-1.pyc
6.412 KB
-rw-r--r--
tooltip.cpython-36.opt-2.pyc
4.82 KB
-rw-r--r--
tooltip.cpython-36.pyc
6.412 KB
-rw-r--r--
tree.cpython-36.opt-1.pyc
13.941 KB
-rw-r--r--
tree.cpython-36.opt-2.pyc
13.179 KB
-rw-r--r--
tree.cpython-36.pyc
13.941 KB
-rw-r--r--
undo.cpython-36.opt-1.pyc
10.527 KB
-rw-r--r--
undo.cpython-36.opt-2.pyc
10.52 KB
-rw-r--r--
undo.cpython-36.pyc
10.527 KB
-rw-r--r--
window.cpython-36.opt-1.pyc
3.082 KB
-rw-r--r--
window.cpython-36.opt-2.pyc
3.074 KB
-rw-r--r--
window.cpython-36.pyc
3.082 KB
-rw-r--r--
zoomheight.cpython-36.opt-1.pyc
1.369 KB
-rw-r--r--
zoomheight.cpython-36.opt-2.pyc
1.313 KB
-rw-r--r--
zoomheight.cpython-36.pyc
1.369 KB
-rw-r--r--
zzdummy.cpython-36.opt-1.pyc
1.178 KB
-rw-r--r--
zzdummy.cpython-36.opt-2.pyc
1.104 KB
-rw-r--r--
zzdummy.cpython-36.pyc
1.178 KB
-rw-r--r--