uawdijnntqw1x1x1
IP : 3.133.110.37
Hostname : host45.registrar-servers.com
Kernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
.
/
..
/
lib64
/
mysql
/
.
/
.
/
..
/
python2.7
/
.
/
ensurepip
/
.
/
..
/
unittest
/
..
/
idlelib
/
FormatParagraph.pyo
/
/
� {fc@s�dZddlZddlmZddd��YZd�Zd�Zd�Zd �Zd �Z d�Z edkr�ddlZej d ddde�ndS(s�Extension to format a paragraph 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 :-) i����N(tidleConftFormatParagraphcBs8eZddgfgZd�Zd�Zdd�ZRS(tformatsFormat Paragraphs<<format-paragraph>>cCs ||_dS(N(teditwin(tselfR((s//usr/lib64/python2.7/idlelib/FormatParagraph.pyt__init__scCs d|_dS(N(tNoneR(R((s//usr/lib64/python2.7/idlelib/FormatParagraph.pytclose sc CsS|d kr0tjddddddd�}n|jj}|jj�\}}|r~|r~|j||�}t|�}n$t||j d��\}}}}|r�t |||�}nt||�}|jd d d�||kr2|j d|�|j�|j||�|j||�|j�n|j d|�|jd�dS(s�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. t extensionsRs max-widthttypetinttdefaultiHtinserttsels1.0tendtbreakN(RRt GetOptionRttexttget_selection_indicestgettget_comment_headertfind_paragraphtindextreformat_commenttreformat_paragrapht tag_removetmark_settundo_block_starttdeleteRtundo_block_stoptsee( RteventtlimitRtfirsttlasttdatatcomment_headertnewdata((s//usr/lib64/python2.7/idlelib/FormatParagraph.pytformat_paragraph_event#s.$ (sFormat Paragraphs<<format-paragraph>>N(t__name__t __module__tmenudefsRRRR&(((s//usr/lib64/python2.7/idlelib/FormatParagraph.pyRs c Cs�tt|jd��\}}|jd|d|�}xM|jd|dd�r�t|�r�|d}|jd|d|�}q;W|}t|�}t|�}xKt|�|kr�t||�r�|d}|jd|d|�}q�Wd|}|d}|jd|d|�}xW|dkr{t|�|kr{t||�r{|d}|jd|d|�}q%Wd|d} | |||j| |�fS(s�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. t.s%d.0s%d.endt<Rii(tmapR tsplitRtcomparetis_all_whiteRtlen( Rtmarktlinenotcoltlinetfirst_linenoR$tcomment_header_lenR"R!((s//usr/lib64/python2.7/idlelib/FormatParagraph.pyRMs,( cCs�|jd�}d}t|�}x*||krMt||�rM|d}q$W||kr^|St||�}|d|kr�t||d�r�t||d�}n|}|| }|}x||kr�t||�r�tjd||�} x�tdt| �d�D]�} | | }|s+qnt||j��|kro||kro|j|j��|}n||d}| dt| �kr| | ddkr|d}qqW|d}q�W|j|j��|j ||�dj |�S(s3Return data reformatted to specified width (limit).s iis(\s+)it (R-R0R/t get_indenttretranget expandtabstappendtrstriptextendtjoin(R#R tlinestitntindent1tindent2tnewtpartialtwordstjtword((s//usr/lib64/python2.7/idlelib/FormatParagraph.pyRrs<% *cs�t���dj�fd�|jd�D��}t|t��d�}t||�}|jd�}d}|ds�d}|d }ndj�fd�|D��|S(s?Return data reformatted to specified width with comment header.s c3s|]}|�VqdS(N((t.0R4(tlc(s//usr/lib64/python2.7/idlelib/FormatParagraph.pys <genexpr>�siti����c3s|]}�|VqdS(N((RJR4(R$(s//usr/lib64/python2.7/idlelib/FormatParagraph.pys <genexpr>�s(R0R?R-tmaxR(R#R R$tformat_widthR%tblock_suffix((R$RKs//usr/lib64/python2.7/idlelib/FormatParagraph.pyR�s( cCstjd|�dk S(s/Return True if line is empty or all whitespace.s^\s*$N(R9tmatchR(R4((s//usr/lib64/python2.7/idlelib/FormatParagraph.pyR/�scCstjd|�j�S(s/Return the initial space or tab indent of line.s ^([ \t]*)(R9RPtgroup(R4((s//usr/lib64/python2.7/idlelib/FormatParagraph.pyR8�scCs/tjd|�}|dkr"dS|jd�S(sReturn 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. s^([ \t]*#*)RLiN(R9RPRRQ(R4tm((s//usr/lib64/python2.7/idlelib/FormatParagraph.pyR�st__main__s&idlelib.idle_test.test_formatparagrapht verbosityitexit((t__doc__R9tidlelib.configHandlerRRRRRR/R8RR'tunittesttmaintFalse(((s//usr/lib64/python2.7/idlelib/FormatParagraph.pyt<module>s8 % $
/home/./../lib64/mysql/././../python2.7/./ensurepip/./../unittest/../idlelib/FormatParagraph.pyo