Package prompt :: Module uf_docstring
[hide private]
[frames] | no frames]

Module uf_docstring

source code

The base class for all the user function classes.

Functions [hide private]
str
bold_text(text)
Convert the text to bold.
source code
str
build_subtitle(text, bold=True, start_nl=True)
Create the formatted subtitle string.
source code
str
create_table(label)
Format and return the table as text.
source code
str
format_text(text)
Format the line of text by wrapping.
source code
Variables [hide private]
  status = Status()
  uf_tables = Uf_tables()
  __package__ = 'prompt'

Imports: wrap, format_table, Status, Uf_tables


Function Details [hide private]

bold_text(text)

source code 

Convert the text to bold.

This is for use in the help system.

Parameters:
  • text (str) - The text to make bold.
Returns: str
The bold text.

build_subtitle(text, bold=True, start_nl=True)

source code 

Create the formatted subtitle string.

Parameters:
  • text (str) - The name of the subtitle.
  • bold (bool) - A flag which if true will return bold text. Otherwise an underlined title will be returned.
  • start_nl (bool) - A flag which if True will add a newline to the start of the text.
Returns: str
The formatted subtitle.

create_table(label)

source code 

Format and return the table as text.

Parameters:
  • label (str) - The unique table label.
Returns: str
The formatted table.

format_text(text)

source code 

Format the line of text by wrapping.

Parameters:
  • text (str) - The line of text to wrap.
Returns: str
The wrapped text.