Package gavo :: Package user :: Module docgen :: Class RSTFragment
[frames] | no frames]

Class RSTFragment

source code

object --+
         |
        RSTFragment

is a collection of convenience methods for generation of RST.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
makeSpace(self)
adds an empty line unless the last line already is empty.
source code
 
addHead(self, head, underliner) source code
 
addHead1(self, head) source code
 
addHead2(self, head) source code
 
delEmptySection(self)
deletes something that looks like a headline if it's the last thing in our content list.
source code
 
addULItem(self, content, bullet='*') source code
 
addDLItem(self, term, definition) source code
 
addDefinition(self, defHead, defBody)
adds a definition list-style item .
source code
 
addNormalizedPara(self, stuff)
adds stuff to the document, making sure it's not glued to any previous material and removing whitespace as necessary for docstrings.
source code
 
addRaw(self, stuff) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  level1Underliner = '\''
  level2Underliner = '.'
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

addDefinition(self, defHead, defBody)

source code 

adds a definition list-style item .

defBody is re-indented with two spaces, defHead is assumed to only contain a single line.