berhoel.cmd_line_history package¶
Save command line history and provide a command line completer for python.
Submodules¶
berhoel.cmd_line_history.history module¶
Handle command line history.
- class berhoel.cmd_line_history.history.History[source]¶
Bases:
object- static save(filename, pos=None, end=None)[source]¶
write history number from pos to end into filename file
berhoel.cmd_line_history.irl_completer module¶
Command line comleter helper for python.
- class berhoel.cmd_line_history.irl_completer.IrlCompleter(*args, **kw)[source]¶
-
- __init__(*args, **kw)[source]¶
Create a new completer for the command line.
Completer([namespace]) -> completer instance.
If unspecified, the default namespace where completions are performed is __main__ (technically, __main__.__dict__). Namespaces should be given as dictionaries.
Completer instances should be used as the completion mechanism of readline via the set_completer() call:
readline.set_completer(Completer(my_namespace).complete)