Package qanda :: Module session
[hide private]
[frames] | no frames]

Module session

source code

A round of prompting the users for, and validating, answers.

These provide a simple, consistent and robust way of formatting prompts for gathering information from a commandline user and validating their answers. Users are prompted with a question and optionally explanatory help text and hints of possible answers.

A question is usually formatted as follows:

helptext ... (multiple lines if need be) ... helptext
question (hints) [default]:

Multiple choice questions are formatted as:

helptext ... (multiple lines if need be) ... helptext
1. choice
2. choice
...
N. choice
question (hints) [default]:
Classes [hide private]
  Session
Variables [hide private]
  prompt = Session()
  __package__ = 'qanda'