Logo Search packages:      
Sourcecode: jhbuild version File versions  Download package

jhbuild::cut_n_paste::optparse::TextWrapper Class Reference

List of all members.

Detailed Description

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'.

Definition at line 1683 of file optparse.py.

Static Public Attributes

dictionary unicode_whitespace_trans = {}
tuple uspace = ord(u' ')
tuple whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace))

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index