prompt-toolkit
A Python library for building powerful interactive command-line applications. Current version: 3.0.52. Release cadence: Regular updates with new features and fixes.
Warnings
- breaking In version 3.0.49, the 'prompt_toolkit.shortcuts' module was removed, which may affect existing code that relies on this module.
- gotcha When using 'prompt_toolkit' in Windows environments, ensure that the terminal supports VT100 escape sequences for proper functionality.
Install
-
pip install prompt_toolkit
Imports
- prompt
from prompt_toolkit import prompt
Quickstart
from prompt_toolkit import prompt
if __name__ == '__main__':
answer = prompt('Give me some input: ')
print(f'You said: {answer}')