python-prompt-toolkit v3.0.27 Release Notes
Release Date: 2022-02-07 // about 2 years ago-
๐ New features:
- ๐ Support for cursor shapes. The cursor shape for prompts/applications can now be configured, either as a fixed cursor shape, or in case of Vi input mode, according to the current input mode.
- ๐ Handle "cursor forward" command in ANSI formatted text. This makes it possible to render many kinds of generated ANSI art.
- Accept
align
attribute inLabel
widget. - โ Added
PlainTextOutput
: an output implementation that doesn't render any ANSI escape sequences. This will be used by default when redirecting stdout to a file. - Added
create_app_session_from_tty
: a context manager that enforces input/output to go to the current TTY, even if stdin/stdout are attached to pipes. - Added
to_plain_text
utility for converting formatted text into plain text.
๐ Fixes:
- Don't automatically use
sys.stderr
for output whensys.stdout
is not a TTY, butsys.stderr
is. The previous behavior was confusing, especially when rendering formatted text to the output, and we expect it to follow redirection.