Package grizzled :: Module history
[hide private]
[frames] | no frames]

Module history

source code

grizzled.history provides a command line history capability that provides the same interface across different history implementations. Currently, it supports three history implementations:

The History class provides the interface and some common methods for all history operations.

To get the appropriate History implementation for the current platform, simply call the get_history() factory method.

Classes [hide private]
  HistoryError
Thrown to indicate history errors, when another exception won't do.
  History
Base class for history implementations.
  ReadlineHistory
  PyReadlineHistory
  DummyHistory
Functions [hide private]
History
get_history(verbose=True)
Factory method to create an appropriate History object.
source code
Variables [hide private]
  DEFAULT_MAXLENGTH = 512
  log = logging.getLogger('history')
  _have_readline = True
  _have_pyreadline = False
  __package__ = 'grizzled'
Function Details [hide private]

get_history(verbose=True)

source code 
Factory method to create an appropriate History object.
Parameters:
  • verbose (bool) - True to display a message on standard output about what history management mechanism is being used.
Returns: History
the History object