File "FormatParagraph.cpython-34.pyc"
Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python34/lib64/python3.4/idlelib/__pycache__/FormatParagraph.cpython-34.pyc
File size: 6.22 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit
f fw @ s d Z d d l Z d d l m Z Gd d d Z d d Z d d Z d
d Z d d
Z d d Z d d Z
e d k r d d l Z e j
d d d d d n d S)a 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 :-)
N)idleConfc @ sI e Z d Z d d g f g Z d d Z d d Z d d d
Z d S)FormatParagraphformatFormat Paragraph<<format-paragraph>>c C s
| | _ d S)N)editwin)selfr r </opt/alt/python34/lib64/python3.4/idlelib/FormatParagraph.py__init__ s zFormatParagraph.__init__c C s
d | _ d S)N)r )r r r r
close s zFormatParagraph.closeNc C sS | d k r0 t j d d d d d d d } n | j j } | j j \ } } | r~ | r~ | j | | } t | } n$ t | | j d \ } } } } | r t | | | } n t
| | } | j d
d d | | k r2| j d | | j
| j | | | j | | | j n | j d | | j d d
S)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
extensionsr z max-widthtypeintdefaultH insertZselz1.0endbreak)r Z GetOptionr textZget_selection_indicesgetget_comment_headerfind_paragraphindexreformat_commentreformat_paragraphZ
tag_removeZmark_setZundo_block_startZdeleter Zundo_block_stopZsee) r Zeventlimitr firstlastdatacomment_headernewdatar r r
format_paragraph_event# s. $
z&FormatParagraph.format_paragraph_event)r r )__name__
__module____qualname__Zmenudefsr r r"