Package user_functions :: Module objects :: Class Desc_container
[hide private]
[frames] | no frames]

Class Desc_container

source code


A special object for holding and processing user function description information.

Instance Methods [hide private]
 
__init__(self, title='Description')
Set up the container.
source code
 
add_item_list_element(self, item, text)
Add the element of an itemised list to the description.
source code
 
add_list_element(self, text)
Add the element of a list to the description.
source code
 
add_paragraph(self, text)
Add a paragraph of text to the description.
source code
 
add_prompt(self, text)
Add the text of a relax prompt example to the description.
source code
 
add_table(self, label)
Add a table to the description.
source code
 
add_verbatim(self, text)
Add a section of verbatim text to the description.
source code
str and anything
element_loop(self, title=False)
Iterator method yielding the description elements.
source code
str
get_title(self)
Return the title of the section.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, title='Description')
(Constructor)

source code 

Set up the container.

Parameters:
  • section (str) - The section title.
Overrides: object.__init__

add_item_list_element(self, item, text)

source code 

Add the element of an itemised list to the description.

Parameters:
  • item (str) - The item text.
  • text (str) - The itemised list element text.

add_list_element(self, text)

source code 

Add the element of a list to the description.

Parameters:
  • text (str) - The list element text.

add_paragraph(self, text)

source code 

Add a paragraph of text to the description.

Parameters:
  • text (str) - The paragraph text.

add_prompt(self, text)

source code 

Add the text of a relax prompt example to the description.

Parameters:
  • text (str) - The relax prompt text.

add_table(self, label)

source code 

Add a table to the description.

Parameters:
  • label (str) - The unique label corresponding to a user_functions.objects.Table instance.

add_verbatim(self, text)

source code 

Add a section of verbatim text to the description.

Parameters:
  • text (str) - The verbatim text.

element_loop(self, title=False)

source code 

Iterator method yielding the description elements.

Parameters:
  • title (bool) - A flag which if True will cause the title to be yielded first.
Returns: str and anything
The element type and corresponding data.

get_title(self)

source code 

Return the title of the section.

Returns: str
The section title.