diff options
author | Jonathan Slenders <jonathan@slenders.be> | 2015-10-04 15:04:03 +0200 |
---|---|---|
committer | Jonathan Slenders <jonathan@slenders.be> | 2015-10-04 15:10:27 +0200 |
commit | 77cdcfbc7f4b4c34a9d2f9a34d422d7152f16209 (patch) | |
tree | 70b9e646d2d84e1a8b8ae68b50223f23252324fe /examples/up-arrow-partial-string-matching.py | |
parent | fb0e8f68432b33181bab329b492cce86e7f84d51 (diff) |
Updated all examples.
Diffstat (limited to 'examples/up-arrow-partial-string-matching.py')
-rwxr-xr-x | examples/up-arrow-partial-string-matching.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/up-arrow-partial-string-matching.py b/examples/up-arrow-partial-string-matching.py index dce649f1..c3283556 100755 --- a/examples/up-arrow-partial-string-matching.py +++ b/examples/up-arrow-partial-string-matching.py @@ -6,7 +6,7 @@ When you type some input, it's possible to use the up arrow to filter the history on the items starting with the given input text. """ from __future__ import unicode_literals, print_function -from prompt_toolkit.shortcuts import get_input +from prompt_toolkit import prompt from prompt_toolkit.history import InMemoryHistory from prompt_toolkit.filters import Always from prompt_toolkit.interface import AbortAction @@ -27,9 +27,9 @@ def main(): print('Press Control-C to retry. Control-D to exit.') print() - text = get_input('Say something: ', history=history, - enable_history_search=Always(), - on_abort=AbortAction.RETRY) + text = prompt('Say something: ', history=history, + enable_history_search=Always(), + on_abort=AbortAction.RETRY) print('You said: %s' % text) |