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:
- GNU Readline, which is built into versions of Python on the Mac
and Unix systems
- pyreadline, which many people use on Windows systems
- A dummy fallback history implementation that does nothing, for when readline
isn't available.
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.
|
DEFAULT_MAXLENGTH = 512
|
|
log = logging.getLogger('history')
|
|
_have_readline = True
|
|
_have_pyreadline = False
|
|
__package__ = ' grizzled '
|
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
|