interactive: add doc() function
... that prints the welcoming message
This commit is contained in:
parent
aba8162676
commit
f60a82557c
@ -35,6 +35,8 @@ What's in the box:
|
|||||||
- dump
|
- dump
|
||||||
- append_to
|
- append_to
|
||||||
- pager
|
- pager
|
||||||
|
* other:
|
||||||
|
- doc(): print this message.
|
||||||
|
|
||||||
You can also enjoy autocompletion with <TAB>.
|
You can also enjoy autocompletion with <TAB>.
|
||||||
"""
|
"""
|
||||||
@ -288,6 +290,10 @@ def stats(names=None, to=dump):
|
|||||||
to(reports.color_totals(BY_COLOR, names, total, summary=True))
|
to(reports.color_totals(BY_COLOR, names, total, summary=True))
|
||||||
|
|
||||||
|
|
||||||
|
def doc(to=dump):
|
||||||
|
to(__doc__)
|
||||||
|
|
||||||
|
|
||||||
def interactive_setup():
|
def interactive_setup():
|
||||||
# Bind ‘TAB’ to complete
|
# Bind ‘TAB’ to complete
|
||||||
readline.parse_and_bind('tab:complete')
|
readline.parse_and_bind('tab:complete')
|
||||||
@ -319,4 +325,4 @@ def interactive_setup():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
interactive_setup()
|
interactive_setup()
|
||||||
print(__doc__)
|
doc()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user