Module Expr Str Assign NameStore Str Import alias alias TryExcept body Assign NameStore NameLoad handlers ExceptHandler type NameLoad body ClassDef bases NameLoad body Pass decorator_list Assign NameStore ListLoad Str Str Str Str Assign NameStore Str ClassDef bases body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpMult Str Call NameLoad NameLoad Assign NameStore Dict Assign NameStore Call NameLoad Str For NameStore Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Str Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr orelse If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Num Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr While CompareLt NameLoad BinOpSub Call NameLoad NameLoad Num body If BoolOpAnd CompareEq SubscriptLoad NameLoad Index BinOpAdd NameLoad Num Str Call NameLoad SubscriptLoad NameLoad Index NameLoad body Assign SubscriptStore NameLoad Index BinOpAdd NameLoad Num Str AugAssignAdd NameStore Num orelse AugAssignAdd NameStore Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If CompareLt NameLoad Num body Assign NameStore Num orelse Assign NameStore BinOpSub NameLoad NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Num Slice NameLoad Assign SubscriptStore NameLoad Index Num SubscriptLoad SubscriptLoad NameLoad Index Num Slice NameLoad orelse If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad If CompareLtE AttributeLoad NameLoad attr Num body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr While NameLoad body Assign NameStore ListLoad Assign NameStore Num If NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpSub AttributeLoad NameLoad attr Call NameLoad NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareEq Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str NameLoad body Delete SubscriptDel NameLoad Index Num While NameLoad body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num If CompareLtE BinOpAdd NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AugAssignAdd NameStore NameLoad orelse Break If BoolOpAnd NameLoad CompareGt Call NameLoad SubscriptLoad NameLoad Index Num NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad If BoolOpAnd AttributeLoad NameLoad attr NameLoad CompareEq Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Delete SubscriptDel NameLoad Index Num If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad Str attr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults Num kwarg body Expr Str Assign NameStore Call NameLoad keyword NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num kwarg body Expr Str Assign NameStore Call NameLoad keyword NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore NameLoad orelse If Call AttributeLoad NameLoad attr NameLoad body Pass orelse If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore NameLoad orelse Assign NameStore Str Break If BoolOpAnd Num NameLoad body For NameStore Call AttributeLoad NameLoad attr Str body Assert BoolOpOr UnaryOpNot NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Str NameLoad Return NameLoad decorator_list If CompareEq NameLoad Str body Print Call NameLoad Str
N/A N/A Text wrapping and filling.
 N/A __revision__ $Id$ N/A string re N/A N/A N/A _unicode unicode N/A N/A N/A NameError N/A _unicode N/A object N/A N/A N/A N/A __all__ N/A TextWrapper wrap fill dedent N/A _whitespace TextWrapper N/A N/A N/A 
    Object for wrapping/filling text.  The public interface consists of
    the wrap() and fill() methods; the other methods are just there for
    subclasses to override in order to tweak the default behaviour.
    If you want to completely replace the main wrapping algorithm,
    you'll probably have to override _wrap_chunks().

    Several instance attributes control various aspects of wrapping:
      width (default: 70)
        the maximum width of wrapped lines (unless break_long_words
        is false)
      initial_indent (default: "")
        string that will be prepended to the first line of wrapped
        output.  Counts towards the line's width.
      subsequent_indent (default: "")
        string that will be prepended to all lines save the first
        of wrapped output; also counts towards each line's width.
      expand_tabs (default: true)
        Expand tabs in input text to spaces before further processing.
        Each tab will become 1 .. 8 spaces, depending on its position in
        its line.  If false, each tab is treated as a single character.
      replace_whitespace (default: true)
        Replace all whitespace characters in the input text by spaces
        after tab expansion.  Note that if expand_tabs is false and
        replace_whitespace is true, every tab will be converted to a
        single space!
      fix_sentence_endings (default: false)
        Ensure that sentence-ending punctuation is always followed
        by two spaces.  Off by default because the algorithm is
        (unavoidably) imperfect.
      break_long_words (default: true)
        Break words longer than 'width'.  If false, those words will not
        be broken, and some lines might be longer than 'width'.
      break_on_hyphens (default: true)
        Allow breaking hyphenated words. If true, wrapping will occur
        preferably on whitespaces and right after hyphens part of
        compound words.
      drop_whitespace (default: true)
        Drop leading and trailing whitespace from lines.
     N/A whitespace_trans N/A N/A string maketrans _whitespace N/A N/A len _whitespace N/A unicode_whitespace_trans N/A N/A uspace N/A ord N/A x N/A map ord _whitespace N/A N/A N/A unicode_whitespace_trans N/A x uspace N/A wordsep_re N/A N/A re compile (\s+|[^\s\w]*\w+[^0-9\W]-(?=\w+[^0-9\W])|(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w)) N/A wordsep_simple_re N/A N/A re compile (\s+) N/A sentence_end_re N/A N/A re compile N/A [%s][\.\!\?][\"\']?\Z N/A string lowercase __init__ N/A N/A self width initial_indent subsequent_indent expand_tabs replace_whitespace fix_sentence_endings break_long_words drop_whitespace break_on_hyphens N/A 70 True True False True True True N/A N/A N/A self width width N/A N/A self initial_indent initial_indent N/A N/A self subsequent_indent subsequent_indent N/A N/A self expand_tabs expand_tabs N/A N/A self replace_whitespace replace_whitespace N/A N/A self fix_sentence_endings fix_sentence_endings N/A N/A self break_long_words break_long_words N/A N/A self drop_whitespace drop_whitespace N/A N/A self break_on_hyphens break_on_hyphens N/A N/A self wordsep_re_uni N/A N/A re compile N/A N/A self wordsep_re pattern N/A re U N/A N/A self wordsep_simple_re_uni N/A N/A re compile N/A N/A self wordsep_simple_re pattern N/A re U N/A _munge_whitespace N/A N/A self text N/A N/A N/A _munge_whitespace(text : string) -> string

        Munge whitespace in text: expand tabs and convert all other
        whitespace characters to spaces.  Eg. " foo	bar

baz"
        becomes " foo    bar  baz".
         N/A N/A self expand_tabs N/A N/A text N/A N/A text expandtabs N/A N/A self replace_whitespace N/A N/A N/A isinstance text str N/A N/A text N/A N/A text translate N/A self whitespace_trans N/A N/A N/A isinstance text _unicode N/A N/A text N/A N/A text translate N/A self unicode_whitespace_trans N/A text N/A _split N/A N/A self text N/A N/A N/A _split(text : string) -> [string]

        Split the text to wrap into indivisible chunks.  Chunks are
        not quite the same as words; see _wrap_chunks() for full
        details.  As an example, the text
          Look, goof-ball -- use the -b option!
        breaks into the following chunks:
          'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ',
          'use', ' ', 'the', ' ', '-b', ' ', 'option!'
        if break_on_hyphens is True, or in:
          'Look,', ' ', 'goof-ball', ' ', '--', ' ',
          'use', ' ', 'the', ' ', '-b', ' ', option!'
        otherwise.
         N/A N/A isinstance text _unicode N/A N/A N/A self break_on_hyphens N/A N/A pat N/A self wordsep_re_uni N/A N/A pat N/A self wordsep_simple_re_uni N/A N/A N/A self break_on_hyphens N/A N/A pat N/A self wordsep_re N/A N/A pat N/A self wordsep_simple_re N/A chunks N/A N/A pat split text N/A chunks N/A filter None chunks N/A chunks N/A _fix_sentence_endings N/A N/A self chunks N/A N/A N/A _fix_sentence_endings(chunks : [string])

        Correct for sentence endings buried in 'chunks'.  Eg. when the
        original text contains "... foo.
Bar ...", munge_whitespace()
        and split() will convert that to [..., "foo.", " ", "Bar", ...]
        which has one too few spaces; this method simply changes the one
        space to two.
         N/A i 0 N/A patsearch N/A N/A self sentence_end_re search N/A N/A i N/A N/A len chunks 1 N/A N/A N/A N/A N/A chunks N/A N/A i 1 N/A patsearch N/A chunks N/A i N/A N/A N/A chunks N/A N/A i 1 N/A i 2 N/A N/A i 1 N/A _handle_long_word N/A N/A self reversed_chunks cur_line cur_len width N/A N/A N/A _handle_long_word(chunks : [string],
                             cur_line : [string],
                             cur_len : int, width : int)

        Handle a chunk of text (most likely a word, not whitespace) that
        is too long to fit in any line.
         N/A N/A width 1 N/A N/A space_left 1 N/A N/A space_left N/A width cur_len N/A N/A self break_long_words N/A N/A N/A N/A cur_line append N/A N/A reversed_chunks N/A -1 N/A space_left N/A N/A reversed_chunks N/A -1 N/A N/A reversed_chunks N/A -1 N/A space_left N/A N/A N/A cur_line N/A N/A N/A N/A cur_line append N/A N/A reversed_chunks pop N/A _wrap_chunks N/A N/A self chunks N/A N/A N/A _wrap_chunks(chunks : [string]) -> [string]

        Wrap a sequence of text chunks and return a list of lines of
        length 'self.width' or less.  (If 'break_long_words' is false,
        some lines may be longer than this.)  Chunks correspond roughly
        to words and the whitespace between them: each chunk is
        indivisible (modulo 'break_long_words'), but a line break can
        come between any two chunks.  Chunks should not have internal
        whitespace; ie. a chunk is either all whitespace or a "word".
        Whitespace chunks will be removed from the beginning and end of
        lines, but apart from that whitespace is preserved.
         N/A lines N/A N/A N/A N/A self width 0 N/A N/A N/A ValueError N/A invalid width %r (must be > 0) N/A self width N/A N/A N/A chunks reverse N/A chunks N/A N/A cur_line N/A N/A cur_len 0 N/A lines N/A N/A indent N/A self subsequent_indent N/A N/A indent N/A self initial_indent N/A width N/A N/A self width N/A len indent N/A N/A N/A self drop_whitespace N/A N/A N/A N/A chunks N/A -1 strip lines N/A N/A N/A chunks N/A -1 N/A chunks N/A N/A l N/A len N/A chunks N/A -1 N/A N/A N/A cur_len l width N/A N/A N/A N/A cur_line append N/A N/A chunks pop N/A cur_len l N/A N/A N/A N/A chunks N/A N/A len N/A chunks N/A -1 width N/A N/A N/A N/A self _handle_long_word chunks cur_line cur_len width N/A N/A N/A self drop_whitespace cur_line N/A N/A N/A N/A cur_line N/A -1 strip N/A N/A N/A cur_line N/A -1 N/A cur_line N/A N/A N/A N/A lines append N/A indent N/A N/A join cur_line N/A lines N/A wrap N/A N/A self text N/A N/A N/A wrap(text : string) -> [string]

        Reformat the single paragraph in 'text' so it fits in lines of
        no more than 'self.width' columns, and return a list of wrapped
        lines.  Tabs in 'text' are expanded with string.expandtabs(),
        and all other whitespace characters (including newline) are
        converted to space.
         N/A text N/A N/A self _munge_whitespace text N/A chunks N/A N/A self _split text N/A N/A self fix_sentence_endings N/A N/A N/A N/A self _fix_sentence_endings chunks N/A N/A N/A self _wrap_chunks chunks N/A fill N/A N/A self text N/A N/A N/A fill(text : string) -> string

        Reformat the single paragraph in 'text' to fit in lines of no
        more than 'self.width' columns, and return a new string
        containing the entire wrapped paragraph.
         N/A N/A N/A join N/A N/A self wrap text N/A N/A wrap N/A N/A text width N/A 70 kwargs N/A N/A Wrap a single paragraph of text, returning a list of wrapped lines.

    Reformat the single paragraph in 'text' so it fits in lines of no
    more than 'width' columns, and return a list of wrapped lines.  By
    default, tabs in 'text' are expanded with string.expandtabs(), and
    all other whitespace characters (including newline) are converted to
    space.  See TextWrapper class for available keyword args to customize
    wrapping behaviour.
     N/A w N/A TextWrapper width width kwargs N/A N/A N/A w wrap text N/A fill N/A N/A text width N/A 70 kwargs N/A N/A Fill a single paragraph of text, returning a new string.

    Reformat the single paragraph in 'text' to fit in lines of no more
    than 'width' columns, and return a new string containing the entire
    wrapped paragraph.  As with wrap(), tabs are expanded and other
    whitespace characters converted to space.  See TextWrapper class for
    available keyword args to customize wrapping behaviour.
     N/A w N/A TextWrapper width width kwargs N/A N/A N/A w fill text N/A N/A _whitespace_only_re N/A N/A re compile ^[ 	]+$ N/A re MULTILINE N/A _leading_whitespace_re N/A N/A re compile (^[ 	]*)(?:[^ 	
]) N/A re MULTILINE dedent N/A N/A text N/A N/A N/A Remove any common leading whitespace from every line in `text`.

    This can be used to make triple-quoted strings line up with the left
    edge of the display, while still presenting them in the source code
    in indented form.

    Note that tabs and spaces are both treated as whitespace, but they
    are not equal: the lines "  hello" and "	hello" are
    considered to have no common leading whitespace.  (This behaviour is
    new in Python 2.5; older versions of this module incorrectly
    expanded tabs before searching for common leading whitespace.)
     N/A margin None N/A text N/A N/A _whitespace_only_re sub text N/A indents N/A N/A _leading_whitespace_re findall text N/A indent indents N/A N/A N/A margin None N/A N/A margin indent N/A N/A N/A N/A indent startswith margin N/A N/A N/A N/A N/A N/A margin startswith indent N/A N/A margin indent N/A N/A margin N/A N/A N/A 0 margin N/A N/A line N/A N/A text split N/A N/A N/A N/A line N/A N/A line startswith margin N/A line = %r, margin = %r N/A line margin N/A margin N/A N/A text N/A N/A re sub N/A (?m)^ margin text N/A text N/A N/A N/A __name__ __main__ N/A N/A N/A dedent Hello there.
  This is indented.