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

Module base_class

source code

The base class for all the user function classes.

Classes [hide private]
  Basic_class
  Exec_info
Container for execution information.
  User_fn_class
Functions [hide private]
 
_build_doc(fn)
Build the fn.__doc__ docstring.
source code
str
_build_subtitle(text)
Create the formatted subtitle string.
source code
str
_format_text(text)
Format the text by stripping whitespace and wrapping.
source code
str
_strip_lead(text)
Strip the leading whitespace from the given text.
source code
Variables [hide private]
  status = Status()
  width = 100
  __package__ = 'prompt'

Imports: platform, sys, wrap, ansi, help, Status, split, strip


Function Details [hide private]

_build_doc(fn)

source code 

Build the fn.__doc__ docstring.

Parameters:
  • fn (method) - The user function to build the docstring for.

_build_subtitle(text)

source code 

Create the formatted subtitle string.

Parameters:
  • text (str) - The name of the subtitle.
Returns: str
The formatted subtitle.

_format_text(text)

source code 

Format the text by stripping whitespace and wrapping.

Parameters:
  • text (str) - The text to strip and wrap.
Returns: str
The stripped and wrapped text.

_strip_lead(text)

source code 

Strip the leading whitespace from the given text.

Parameters:
  • text (str) - The text to strip the leading whitespace from.
Returns: str
The text with leading whitespace removed.