NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #1242 most downloaded on PyPI
Easy, practical library for making terminal apps, by providing an elegant, well-documented interface for Terminals.
Latest stable
1.53.0
Last release 2 days ago
20 Nov 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 57 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
78 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
fix display-modes.py and change type by @jquast in #433
Full Changelog: 1.52...1.53
Your coding agent can read these notes before it upgrades. Set up the MCP server →
change: type of term_program changed from Union[str,bool] to str , PR #433
improve: performance of clip() and truncate() , PR #434 .
bugfix: small mathematics errors in dist_cie2000() and dist_cie94() now match the test data published by Sharma, Wu & Dalal (2005), #424 .
433
improve: performance of ~Terminal.clip and ~Terminal.truncate, 434.
bugfix: small mathematics errors in ~blessed.color.dist_cie2000 and ~blessed.color.dist_cie94 now match the test data published by Sharma, Wu & Dalal (2005), 424.
Preserve whitespace-only lines when wrapping by @Rajvira10 in #423
Full Changelog: 1.51...1.52
bugfix: wrap() discarded lines containing only spaces or tabs when drop_whitespace=False , they are now wrapped and retained, PR #423 .
drop_whitespace=False, they are now wrapped and retained, 423.
wcwidth 0.9.2 integration by @jquast in #420
Full Changelog: 1.50...1.51
introduced: clip() to extract a “window” of displayed columns from a string, a more precise version of truncate() , retaining terminal sequences, PR #420 .
improved: length() , ljust() , rjust() , center() , truncate() , and wrap() with terminal-specific Corrections by detecting the terminal software name at class-initialization, #420 .
change: East Asian ambiguous width is not measured at class-initialization. Call detect_ambiguous_width() to measure it, which assigns and caches ambiguous_width , or set AMBIGUOUS_WIDE to 1 or 2 to supply the value without measurement, PR #420 .
introduced: detect_term_program() to detect the terminal software name, or to detect it again after initialization, as needed by a terminal attached later, such as a remote stream, PR #420 .
change: get_software_version() returns the TERM_PROGRAM and TERM_PROGRAM_VERSION environment values when defined, without inquiry, and these values also override the Corrections detection and the XTVERSION query otherwise made for term_program , PR #420 .
deprecated: Python 3.8 and earlier no longer supported. PR #420 .
more precise version of ~Terminal.truncate, retaining terminal sequences, 420.
improved: ~Terminal.length, ~Terminal.ljust, ~Terminal.rjust, ~Terminal.center, ~Terminal.truncate, and ~Terminal.wrap with terminal-specific Corrections_ by detecting the terminal software name at class-initialization, 420.
change: East Asian ambiguous width is not measured at class-initialization. Call ~Terminal.detect_ambiguous_width to measure it, which assigns and caches ~Terminal.ambiguous_width, or set AMBIGUOUS_WIDE to 1 or 2 to supply the value without measurement, 420.
introduced: ~Terminal.detect_term_program to detect the terminal software name, or to detect it again after initialization, as needed by a terminal attached later, such as a remote stream, 420.
change: ~Terminal.get_software_version returns the TERM_PROGRAM and TERM_PROGRAM_VERSION environment values when defined, without inquiry, and these values also override the Corrections_ detection and the XTVERSION query otherwise made for ~Terminal.term_program, 420.
deprecated: Python 3.8 and earlier no longer supported. 420.
Do not query XTGETTCAP on Windows Server 2022 by @jquast in #411
Full Changelog: 1.49...1.50
change: default timeout of automatic terminal queries from 1 to 5 seconds with environment variable BLESSED_QUERY_TIMEOUT_SECONDS override, PR #414 .
bugfix: Do not automatic query XTGETTCAP for older CONPTY builds (Windows Server 2022), which displays control codes as visible text PR #411 .
bugfix: mouse_enabled() failed to yield MOUSE_* keystrokes on older CONPTY builds (Windows Server 2022), where the console’s “QuickEdit mode” blocks transmission, PR #412 .
bugfix: an XTGETTCAP received after query time out was returned by inkey() as errant keystrokes. It is no longer yielded by inkey() , PR #413 .
bugfix: does_iterm2_graphics() results are now more accurate, by drawing a transparent pixel, PR #416 .
improve: performance of does_xtgettcap() , PR #415 .
improve: skip some automatic queries for Apple’s Terminal.app that leak VT100 codes as output PR #417 .
change: default timeout of automatic terminal queries from 1 to 5 seconds with environment variable BLESSED_QUERY_TIMEOUT_SECONDS override, PR #414 .
variable BLESSED_QUERY_TIMEOUT_SECONDS override, 414.
bugfix: Do not automatic query `XTGETTCAP`_ for older CONPTY builds (Windows Server 2022), which displays control codes as visible text 411.
bugfix: ~Terminal.mouse_enabled failed to yield MOUSE_* keystrokes on older CONPTY builds (Windows Server 2022), where the console's "QuickEdit mode" blocks transmission, 412.
bugfix: an `XTGETTCAP`_ received after query time out was returned by ~Terminal.inkey as errant keystrokes. It is no longer yielded by ~Terminal.inkey, 413.
bugfix: ~Terminal.does_iterm2_graphics results are now more accurate, by drawing a transparent pixel, 416.
improve: performance of ~Terminal.does_xtgettcap, 415.
improve: skip some automatic queries for Apple's Terminal.app that leak VT100 codes as output 417.
change: default timeout of automatic terminal queries from 1 to 5 seconds with environment variable BLESSED_QUERY_TIMEOUT_SECONDS override, 414.
Improved performance by caching jinxed.tparm calls by @jquast in #404
introduce: get_font_coverage() reports codepoints the terminal font has a glyph for, by mintty’s OSC 7771 Font Glyph Coverage Enquiry or the APC 25a1 Glyph Protocol, PR #407 .
bugfix: Legacy Mouse Protocols event names and button values, mouse release events returned by inkey() were always MOUSE_LEFT_RELEASED for all buttons, they now report MOUSE_RELEASED , PR #406 .
bugfix: Mouse buttons 6 through 11 were erroneously decoded as left, middle, or right instead of MOUSE_BUTTON_6 through MOUSE_BUTTON_11 , PR #406 .
improve: performance of automatic terminal query replies, PR #405 .
improve: all parameterized capabilities are now memorized, about 50x faster, PR #404 .
bugfix: truncate() by bump of dependency wcwidth>=0.8.3 , #402 .
bugfix: :meth: ~Terminal.async_inkey dropped keystrokes while another task is busy.
1.48
~Terminal.async_inkey dropped keystrokes while another task is busy.1.47
~Terminal.does_sixel now returns True for SyncTERM using special-caseLEFT_MOTIONMOTION, :ghpull:398.\x1b\n as KEY_ALT_ENTER instead of KEY_CTRL_ALT_J.bugfix: async_inkey() dropped keystrokes while another task is busy, #401 .
bugfix: ~Terminal.async_inkey dropped keystrokes while another task is busy, 401.
- bugfix: does_sixel() now returns True for SyncTERM using special-case matching of its illegal DA1 response.
bugfix: does_sixel() now returns True for SyncTERM using special-case matching of its illegal DA1 response.
bugfix: legacy SGR mouse decoder reported no-button motion event (mode 1003) as LEFT_MOTION instead of MOTION , PR #398 .
bugfix: match keyboard input \x1b\n as KEY_ALT_ENTER instead of KEY_CTRL_ALT_J .
bugfix DA1 response for some terminals (kitty) by @jquast in #392
bugfix: does_sixel() failed to detect DA1 and caused the response to “leak” into next call to inkey() for some terminals of unmatched patterns (e.g., kitty).
improve: add new sugar for extended cap-defined styles, like ‘clear_scrollback’ (common), ‘strikethrough’, and ‘overline’ (not common).
improve: Truecolor support by unique TERM, improves remote sessions like SSH that do not forward COLORTERM , and, for the few terminals that do not respond to XTGETTCAP request for RGB : (kitty).
- bugfix: name consistency of kitty keyboard modifiers PR #390 .
bugfix: name consistency of kitty keyboard modifiers PR #390 .
- improve: reduce errant XTGETTCAP output for Terminal.app and ConEmu.exe PR #385 .
improve: reduce errant XTGETTCAP output for Terminal.app and ConEmu.exe PR #385 .
bugfix leaked XTGETTCAP responses into inkey() by @jquast in https://github.com/jquast/blessed/pull/383
Full Changelog: https://github.com/jquast/blessed/compare/1.42...1.43
bugfix: regression of XTGETTCAP responses leaking into first call for empty/non-response terminals (libvte/Gnome Terminal), in versions 1.40 to 1.42 PR #383 .
bugfix: regression in Terminal.cbreak() and raw were not thread-safe broken in versions 1.40 and 1.41, remove signal ignore of SIGTTOU #380
Terminal.cbreak() and raw were not thread-safe broken in versions 1.40 and 1.41, remove signal ignore of SIGTTOU #380Full Changelog: https://github.com/jquast/blessed/compare/1.41...1.42
Terminal.cbreak() and raw were not thread-safe broken in versions 1.40 and 1.41, remove signal ignore of SIGTTOU #380Full Changelog: 1.41...1.42
broken in versions 1.40 and 1.41, remove signal ignore of SIGTTOU 380.
bugfix get_location() return type in 1.40 release by @jquast in https://github.com/jquast/blessed/pull/379
Full Changelog: https://github.com/jquast/blessed/compare/1.40...1.41
bugfix: get_location() broken in 1.40, returned a generator instead of a tuple. #378 .
curses-free jinxed 2.0 integration by @jquast in https://github.com/jquast/blessed/pull/374
Full Changelog: https://github.com/jquast/blessed/compare/1.39...1.40
improved: jinxed is now required on all platforms , providing a curses-free and singleton-free implementation of the subset of curses used by blessed. The jinxed 1.5.0 release provides a terminal capability database https://jinxed.readthedocs.io/en/stable/capabilities.html#database of 45 terminals and their common aliases.
improved: Class initialization of Terminal() now uses XTGETTCAP to determine preferred terminal name TN , 24-bit color support RGB , number of colors Co , italic , and blink capabilities.
This improves detection of Terminal kind and number_of_colors over protocols like serial that cannot forward any environment variables or ssh that do not forward COLORTERM .
introduced: A UserWarning is emitted when getattr() resolves an unknown terminal capability name, helping developers catch typos like term.bld (missing bold ). The warning can be suppressed by setting the environment variable BLESSED_NOWARN_UNKNOWN_CAPS .
bugfix: Fixed internal typo susimpleript to the correct terminfo name ssubm for the enter_susimpleript_mode capability. This was previously masked by curses returning an empty string for unknown capabilities.
- introduced: progress_bar() for OSC 9;4 sequence .
introduced: progress_bar() for OSC 9;4 sequence .
introduced: text_sized() – wrap text in Kitty text sizing protocol (OSC 66) escape sequences, with graceful fallback to plain text when the terminal does not support the protocol.
introduced: Keystroke of name CPR_RESPONSE for asynchronous capture of Cursor Position Report responses via inkey() . New argument capture_cpr=True resolves the legacy F3 key ambiguity and matches against CPR_RESPONSE . New properties cpr_yx and cpr_xy return the decoded cursor coordinates. PR #369 .
improved: inkey() raises EOFError when keyboard fd is at EOF, rather than returning an empty Keystroke . PR #371 .
improved: ljust() , rjust() , and center() now measure text containing hyperlinks, Kitty text sizing protocol sequences, and overtyping (backspace/cursor-left with painter’s algorithm), introduced by wcwidth 0.7.0.
<https://ghostty.org/docs/vt/osc/conemu#change-progress-state-(osc-94)>`_.
introduced: ~.Terminal.text_sized -- wrap text in Kitty text sizing protocol (OSC 66) escape sequences, with graceful fallback to plain text when the terminal does not support the protocol.
introduced: ~.Keystroke of name CPR_RESPONSE for asynchronous capture of Cursor Position Report responses via ~.Terminal.inkey. New argument capture_cpr=True resolves the legacy F3 key ambiguity and matches against CPR_RESPONSE. New properties ~.Keystroke.cpr_yx and ~.Keystroke.cpr_xy return the decoded cursor coordinates. 369.
improved: ~.Terminal.inkey raises EOFError when keyboard fd is at EOF, rather than returning an empty ~.Keystroke. 371.
improved: ~.Terminal.ljust, ~.Terminal.rjust, and ~.Terminal.center now measure text containing hyperlinks, Kitty text sizing protocol sequences, and overtyping (backspace/cursor-left with painter's algorithm), introduced by wcwidth_ 0.7.0.
Handle EOF when stdin is a pipe by @jquast in https://github.com/jquast/blessed/pull/366
Full Changelog: https://github.com/jquast/blessed/compare/1.37...1.38
introduced: does_osc52_clipboard() , clipboard_copy() , and clipboard_paste() to detect, copy, and read from clipboard.
introduced: get_color_scheme() .
introduced: does_kitty_query() for Kitty’s XTGETTCAP query extensions.
introduced: does_decrqss() for DECRQSS (Request Status String).
introduced: does_styled_underlines() and does_colored_underlines() – detect extended underline styles ( Smulx ) and colored underlines ( Setulc ) via XTGETTCAP.
introduced: set_window_title() and window_title() – set the terminal window and/or icon title via xterm OSC sequences, with a context manager that pushes and pops the title stack (XTWINOPS).
introduced: DecModeResponse.recognized and DecModeResponse.supported properties – distinguish modes the terminal acknowledges from those it can actually use.
improved: Smulx and Setulc added to XTGETTCAP capability list.
bugfix: EOF when stdin is connected to a Pipe (eg. pytest capture) caused infinite loop PR #366 .
bugfix: Background SGR not applying to text/suggestion content in blessed.line_editor.LineEditor , now prepend bg_sgr before each content SGR sequence.
bugfix: OSC responses for ‘ST’ in addition to ‘BEL’ terminated iTerm2 capabilities, Kitty notifications, Kitty pointer shapes responses
~.Terminal.clipboard_paste to detect, copy, and read from clipboard.
introduced: ~.Terminal.get_color_scheme.
introduced: ~.Terminal.does_kitty_query for Kitty's XTGETTCAP query extensions.
introduced: ~.Terminal.does_decrqss for DECRQSS (Request Status String).
introduced: ~.Terminal.does_styled_underlines and ~.Terminal.does_colored_underlines -- detect extended underline styles (Smulx) and colored underlines (Setulc) via XTGETTCAP.
introduced: ~.Terminal.set_window_title and ~.Terminal.window_title -- set the terminal window and/or icon title via xterm OSC sequences, with a context manager that pushes and pops the title stack (XTWINOPS).
introduced: DecModeResponse.recognized and DecModeResponse.supported properties -- distinguish modes the terminal acknowledges from those it can actually use.
improved: Smulx and Setulc added to XTGETTCAP capability list.
bugfix: EOF when stdin is connected to a Pipe (eg. pytest capture) caused infinite loop 366.
bugfix: Background SGR not applying to text/suggestion content in blessed.line_editor.LineEditor, now prepend bg_sgr before each content SGR sequence.
bugfix: OSC responses for 'ST' in addition to 'BEL' terminated iTerm2 capabilities, Kitty notifications, Kitty pointer shapes responses
bugfix: legacy CSI letter-form sequences with explicit modifiers and event type (e.g., \x1b[1;1:1A for arrow key press) were not resolved to key names
\x1b[1;1:1A for arrow key press) were not resolved to key names, this affected only some terminals, such as Ghostty.bugfix: [ key returned Keystroke.name of CSI in Kitty keyboard protocol mode, it is now correctly identified as KEY_LEFT_SQUARE_BRACKET.
bugfix: [ key returned name of value CSI in Kitty keyboard protocol mode, it now returns KEY_LEFT_SQUARE_BRACKET .
improved: Kitty keyboard protocol now synthesizes name for all ASCII alphanumeric and punctuation keys, including unmodified press events (e.g., KEY_A , KEY_PERIOD , KEY_LEFT_SQUARE_BRACKET ). Previously, only modified or released/repeated keys received synthesized names.
mode, it now returns KEY_LEFT_SQUARE_BRACKET.
improved: Kitty keyboard protocol now synthesizes ~.Keystroke.name for all ASCII alphanumeric and punctuation keys, including unmodified press events (e.g., KEY_A, KEY_PERIOD, KEY_LEFT_SQUARE_BRACKET). Previously, only modified or released/repeated keys received synthesized names.
introduced: new method Terminal.cursor_shape() context manager and blessed.cursor_shape.CursorShape constants for DECSCUSR cursor shape control (block
Terminal.cursor_shape() context manager and blessed.cursor_shape.CursorShape constants for DECSCUSR cursor shape control (block, underline, bar -- steady or blinking).Terminal.get_fgcolor and method Terminal.get_bgcolor now correctly interprets ST-terminated OSC responses in addition to BEL-terminated.Keystroke.name for "released" and "repeated" key states, when using the kitty keyboard protocol.Keystroke.key_name and Keystroke.key_value allow for better key and value tracking when using kitty keyboard protocol with pressed, released, and repeated events.introduced: cursor_shape() context manager and CursorShape constants for DECSCUSR cursor shape control (block, underline, bar – steady or blinking).
introduced: methods key_name() and key_value() allow for better key and value tracking when using kitty keyboard protocol with pressed, released, and repeated events.
improved: Synthesize name for “released” and “repeated” key states, when using the kitty keyboard protocol.
bugfix: get_fgcolor() and get_bgcolor() now correctly interprets ST-terminated OSC responses in addition to BEL-terminated.
~blessed.cursor_shape.CursorShape constants for DECSCUSR cursor shape control (block, underline, bar -- steady or blinking).
introduced: methods ~Keystroke.key_name and ~Keystroke.key_value allow for better key and value tracking when using kitty keyboard protocol with pressed, released, and repeated events.
improved: Synthesize ~.Keystroke.name for "released" and "repeated" key states, when using the kitty keyboard protocol.
bugfix: ~.Terminal.get_fgcolor and ~.Terminal.get_bgcolor now correctly interprets ST-terminated OSC responses in addition to BEL-terminated.
improved: Windows now supports Terminal.does_mouse(), Terminal.notify_on_resize(), and Terminal.mouse_enabled(). More than 100x improvement of respons
Terminal.does_mouse(), Terminal.notify_on_resize(), and Terminal.mouse_enabled(). More than 100x improvement of response times to keyboard input and automatic response sequences on the Windows platform by using WaitForSingleObject initially proposed by @cr545l, #354.Terminal.async_inkey() no longer raises NotImplementedError on Windows.improved: Windows now supports does_mouse() , notify_on_resize() , and mouse_enabled() . More than 100x improvement of response times to keyboard input and automatic response sequences on the Windows platform by using WaitForSingleObject initially proposed by cr545l , PR #354 .
bugfix: async_inkey() no longer raises NotImplementedError on Windows.
More detections and minor fix by @jquast in https://github.com/jquast/blessed/pull/357
Full Changelog: https://github.com/jquast/blessed/compare/1.31...1.33
bugfix: blessed.line_editor.LineEditor exceed limit when using Yank (Ctrl+Y).
- bugfix: get_kitty_keyboard_state() should not check for does_styling as a requirement.
bugfix: get_kitty_keyboard_state() should not check for does_styling as a requirement.
bugfix: get_fgcolor() and get_bgcolor() now return “no support” value, (-1, -1, -1) when does_styling is False.
introduced: does_kitty_clipboard() , does_kitty_pointer_shapes() , and does_text_sizing()
introduced: to_dict() and DecPrivateMode.BRACKETED_PASTE_MIME constant (mode 5522).
~.Terminal.does_styling as a requirement.
bugfix: ~.Terminal.get_fgcolor and ~.Terminal.get_bgcolor now return "no support" value, (-1, -1, -1) when ~.Terminal.does_styling is False.
introduced: ~.Terminal.does_kitty_clipboard, ~.Terminal.does_kitty_pointer_shapes, and ~.Terminal.does_text_sizing
introduced: ~.DecModeResponse.to_dict and DecPrivateMode.BRACKETED_PASTE_MIME constant (mode 5522).
LineEditor and async_inkey() by @jquast in https://github.com/jquast/blessed/pull/353
Full Changelog: https://github.com/jquast/blessed/compare/1.30...1.31
bugfix: cbreak() and raw() should use TCSADRAIN to preserve keystrokes buffered during mode switches, previously TCSAFLUSH was used which discarded unread input, dropping keystrokes.
improved: all terminal query methods now use a CPR boundary guard for fast negative detection of unsupported features: get_fgcolor() , get_bgcolor() , get_device_attributes() , and get_software_version() .
introduced: async_inkey() – asyncio-compatible version of inkey() .
introduced: blessed.line_editor.LineEditor , a “headless” single-line editor.
introduced: get_xtgettcap() – query terminal capabilities via XTGETTCAP and get_iterm2_capabilities() for iTerm2 protocol features.
introduced: terminal feature detection methods does_bracketed_paste() , does_focus_events() , does_grapheme_clustering() does_iterm2() , does_iterm2_graphics() , does_kitty_graphics() , does_kitty_notifications() , does_synchronized_output() , and does_xtgettcap() .
buffered during mode switches, previously TCSAFLUSH was used which discarded unread input, dropping keystrokes.
improved: all terminal query methods now use a CPR boundary guard for fast negative detection of unsupported features: ~.Terminal.get_fgcolor, ~.Terminal.get_bgcolor, ~.Terminal.get_device_attributes, and ~.Terminal.get_software_version.
introduced: ~.Terminal.async_inkey -- asyncio-compatible version of ~.Terminal.inkey.
introduced: blessed.line_editor.LineEditor, a "headless" single-line editor.
introduced: ~.Terminal.get_xtgettcap -- query terminal capabilities via XTGETTCAP and ~.Terminal.get_iterm2_capabilities for iTerm2 protocol features.
introduced: terminal feature detection methods ~.Terminal.does_bracketed_paste, ~.Terminal.does_focus_events, ~.Terminal.does_grapheme_clustering ~.Terminal.does_iterm2, ~.Terminal.does_iterm2_graphics, ~.Terminal.does_kitty_graphics, ~.Terminal.does_kitty_notifications, ~.Terminal.does_synchronized_output, and ~.Terminal.does_xtgettcap.
bugfix kitty keyboard protocol detection by @jquast in https://github.com/jquast/blessed/pull/348
Full Changelog: https://github.com/jquast/blessed/compare/1.28...1.30
bugfix: Terminal.wrap drops color escape sequences, PR #352 .
bugfix: Prevent rare feedback loops in automatic responses, PR #350 .
- bugfix: Terminal.get_kitty_keyboard_state() failed to match PR #348 .
bugfix: Terminal.get_kitty_keyboard_state() failed to match PR #348 .
Benchmarking, using codspeed.io by @jquast in https://github.com/jquast/blessed/pull/345
Full Changelog: https://github.com/jquast/blessed/compare/1.27...1.28
improved: upgrade to wcwidth 0.5, improving performance and correctness of Terminal.wrap() , Terminal.ljust() , and related functions, PR #344 .
deprecated: Python 3.7 and earlier no longer supported. PR #344 .
fix flit/delete MANIFEST.in for re-release, by @jquast in https://github.com/jquast/blessed/pull/341
Full Changelog: https://github.com/jquast/blessed/compare/1.26...1.27
bugfix missing tests, bin, and docs folder in 1.26 release, PR #341 .
mypy check no-untyped-call and type-var by @grayjk in https://github.com/jquast/blessed/pull/327
Full Changelog: https://github.com/jquast/blessed/compare/1.25...1.26
introduced: Terminal.detect_ambiguous_width() , PR #339 .
introduced: Terminal.no_line_wrap() , context manager for attributes disable_line_wrap and enable_line_wrap PR #337 .
introduced: New methods Terminal.color_hex() and Terminal.on_color_hex() and bugfix parsing of uncommon responses in Terminal.get_fgcolor() and bgcolor, PR #335 .
improved: performance of Terminal.wrap() , PR #331 by grayjk .
improved: Terminal.wrap() gets break_on_hyphen support, matching behavior of textwrap.wrap() by ps06756 in PR #330 .
bugfix: for missing leading sequences in Terminal.center() , Terminal.wrap() , add support for emojis containing Zero Width Joiner ( u200D ) or Variation Selector-16 ( uFE0F ), PR #338
bugfix: The "Copy globals" fix in 1.20 got reverted in release in 1.23 by #306, this release re-applies the fix, #326.
1.25
bugfix: get_sixel_height_and_width detection order and improve documentation for window resize event handling #320
get_sixel_height_and_width detection order
and improve documentation for window resize event handling #320
timeout=None to timeout=1 in methods
requiring automatic response, preventing stalls on "dumb" terminals #317deprecated: Python 2.7 through 3.6 no longer supported. #299
blessed.Terminal argument value, force_styling #295
improved: performance of ~Terminal.rgb_downconvert for 256-color terminals, #298
deprecated: Python 2.7 through 3.6 no longer supported. #299
improved: keyboard support for modifier keys, #306
introduced: kitty keyboard protocol support, #309
introduced: mouse support, Synchronized Output, and support for DEC Private Modes, #310
introduced: methods to determine Sixel, dimensions and color depth #312
introduced: in-band resize support (DEC Private Mode 2048) #313
introduced: XTVersion identification: #314
bugfix: default timeout for get_bgcolor, get_fgcolor #315
Performance improved in Terminal.Length and Sequence.padd by @grayjk and @avylove, #286, #287, #289, and #291
Terminal.Length and Sequence.padd by @grayjk and @avylove, #286, #287, #289, and #291Full Changelog: https://github.com/jquast/blessed/compare/1.21.0...1.22.0
improved: performance of length() and wrap() via PR #286 , PR #287 , PR #289 , and PR #291
spelling fixes, PR #278 , PR #293
~Terminal.wrap via 286, 287, 289, and 291
spelling fixes, 278, 293
bugfix infinite loop in method Terminal.wrap() when "Wide" characters of width 2 (East-Asian or Emoji) are used with a wrap width of 1, and a small pe
Terminal.wrap() when "Wide" characters of
width 2 (East-Asian or Emoji) are used with a wrap width of 1, and a small
performance enhancement, #273 and #274 by @grayjk, merged as #275bugfix: infinite loop in wrap() when “Wide” characters of width 2 (East-Asian or Emoji) are used with a wrap width of 1, and a small performance enhancement, #273 and PR #274 by grayjk merged as PR #275 .
introduced Terminal.get_fgcolor() and Terminal.get_bgcolor() to query the terminal for the currently set colors. #237 by @stefanholek
Terminal.get_fgcolor() and Terminal.get_bgcolor() to query
the terminal for the currently set colors. #237 by @stefanholek
RuntimeError in multithreaded
applications, #248 by @adamnovakintroduced: get_fgcolor() and get_bgcolor() to query the terminal for the currently set colors. #237 by stefanholek
bugfix: Copy globals dict before iterating to avoid RuntimeError in multithreaded applications, #248 by adamnovak
the terminal for the currently set colors. 237 by stefanholek
bugfix: Copy globals dict before iterating to avoid RuntimeError in multithreaded applications, 248 by adamnovak
enhancement: Terminal.rjust(), Terminal.ljust(), and Terminal.center() now accept `SupportsIndex`types, #234
Terminal.rjust(), Terminal.ljust(),
and Terminal.center() now accept SupportsIndextypes, #234
AssertionError, #235introduced: Terminal.truncate(), #212 by @fishermans-friend
introduced: truncate() to truncate a string while retaining the sequences, #211 by fishermans-friend
enhancement: Add small sleep in kbhit() on Windows to reduce CPU load #209 by numerlor
enhancement: rjust() , ljust() , and center() now accept SupportsIndex types, #234
enhancement: When 88 colors is detected, it is now interpreted as 16 colors rather than raising an AssertionError , #235
bugfix: Fix global variable declarations in type annotations, #230 by mwchase
retaining the sequences, 211 by fishermans-friend
enhancement: Add small sleep in ~Terminal.kbhit on Windows to reduce CPU load 209 by numerlor
enhancement: ~Terminal.rjust, ~Terminal.ljust, and ~Terminal.center now accept ~typing.SupportsIndex types, 234
enhancement: When 88 colors is detected, it is now interpreted as 16 colors rather than raising an AssertionError, 235
bugfix: Fix global variable declarations in type annotations, 230 by mwchase
bugfix: Terminal.split_seqs() for some sequences like term.move_left(3), #197
introduced: type annotations, #192 by @dlax.
end='', and document about it in location.rst, #188 by @pyfischbugfix: split_seqs() for some sequences like term.move_left(3) , #197 .
introduced: type annotations, #192 by dlax .
bugfix: do not fail when sys.stdin is unset, #195 by Olen
docfix: correct “Bottom of the screen” example to use end='' and document about it in location.rst, #188 by pyfisch
enhancement: Instantiate SequenceTextWrapper only once in method Terminal.wrap(), #184
enhancement: Instantiate SequenceTextWrapper only once in method Terminal.wrap(), #184
From @stanislavlevin Make the actual version consistent with the pypi/tag one #181 by bumping to 1.17.11 and re-releasing, commit 5a8219087b51c183cf34
From @stanislavlevin Make the actual version consistent with the pypi/tag one #181 by bumping to 1.17.11 and re-releasing, commit 5a8219087b51c183cf34952cdbcf1794d0c7ce59
bugfix: Fix detection of shift+arrow keys when using tmux. 178.
178.* bugfix: Now imports on 3.10+
remove _build and __pycache__ and other such folders/files from sdist, #173, a regression from #161
_build and __pycache__ and other such folders/files from sdist, #173, a regression from #161Introduced: formatter() which returns callable formatters for valid text formatters such as ‘red’ or ‘bold_on_red’, returning a NullCallableString if
formatter() which returns callable formatters for valid text formatters such as ‘red’ or ‘bold_on_red’, returning a NullCallableString if passed an invalid text formatter.bugfix: Use UTF-8 for keyboard if input encoding cannot be determined.
bugfix: Use UTF-8 for keyboard if input encoding cannot be determined.
Nothing published for this version
Nothing published for this version
add pixel_height and pixel_width, for libsixel support or general curiosity, it actually works on most of the terminals I tested! This wasn't the case
pixel_height and pixel_width, for libsixel support or general curiosity, it actually works on most of the terminals I tested! This wasn't the case several years ago, closes #155__getnewargs__, with tests.Nothing published for this version
Documentation overhaul, to include plenty of examples and animated screenshots.
deprecated: the direct curses move() capability is no longer recommended, suggest to use move_xy(), which matches the return value of .get_location.
color foreground method color_rgb and background method on_color_rgb, as well as 676 common X11 color attribute names are now possible, such as term.aquamarine_on_wheat, #60.
positional arguments, (x, y) match the return value of get_location, and all other common graphics library calls, #65. values over the b``term.move``.
move_right which are strings that move the cursor one cell in the respective direction, are now also callables for moving n cells to the given direction, such as term.move_right(9), .
conditions where sys.__stdout__ has been detached in test frameworks, #126.
cursor_report, #94.
was greater than 15, #101.
keypad now flush the stream after writing their sequences.
match, term.BACKSPACE, #115 by @jwezel.
move_xy(), which matches the return value of .get_location.
with colors, such as in phrase Terminal.blue_subscript('a'). These attributes are not typically supported, anyway. Use Unicode text or 256 or 24-bit color codes instead.
module namespace.
deprecated: curses.setupterm is now called with os.devnull as the file descriptor, let us know if this causes any issues! 59.
is not a terminal, programs using Terminal.inkey may block indefinitely if a keyboard is not attached, #69.
though such value is always True since 1.9.
introduced: Hyperlinks , method link() , #116 .
introduced: 24-bit color support, detected by term.number_of_colors == 1 << 24 , and 24-bit color foreground method color_rgb() and background method on_color_rgb() , as well as 676 common X11 color attribute names are now possible, such as term.aquamarine_on_wheat , #60 .
introduced: term.move_xy , recommended over built-in move capability, as the argument order, (x, y) matches the return value of get_location() , and all other common graphics library calls, #65 .
introduced: move_up() , move_down() , Terminal.move_left() , move_right() which are strings that move the cursor one cell in the respective direction, are now also callables for moving n cells to the given direction, such as term.move_right(9) .
introduced: pixel_width and pixel_height for libsixel support or general curiosity.
introduced: formatter() which returns callable formatters for valid text formatters such as ‘red’ or ‘bold_on_red’, returning a NullCallableString if passed an invalid text formatter.
bugfix: prevent ValueError: I/O operation on closed file on sys.stdin in multiprocessing environments, where the keyboard wouldn’t work, anyway.
bugfix: prevent error condition, ValueError: underlying buffer has been detached in rare conditions where sys.stdout has been detached in test frameworks. #126 .
bugfix: off-by-one error in get_location() , now accounts for %i in cursor_report, #94 .
bugfix split_seqs() and related functions failed to match when the color index was greater than 15, #101 .
bugfix: Context Managers, fullscreen() , hidden_cursor() , and keypad() now flush the stream after writing their sequences.
bugfix: chr(127) , \x7f has changed from keycode term.DELETE to the more common match, term.BACKSPACE , #115 by jwezel .
bugfix: ensure FormattingOtherString may be pickled.
bugfix: Use UTF-8 for keyboard if input encoding cannot be determined.
deprecated: the curses move() capability is no longer recommended, suggest to use move_xy() , which matches the return value of get_location() .
deprecated: superscript , subscript , shadow , and dim are no longer “compoundable” with colors, such as in phrase Terminal.blue_subscript('a') . These attributes are not typically supported, anyway. Use Unicode text or 256 or 24-bit color codes instead.
deprecated: additional key names, such as KEY_TAB , are no longer “injected” into the curses module namespace.
bugfix: briefly tried calling curses.setupterm() with os.devnull as the file descriptor, reverted. #59 .
deprecated: inkey() no longer raises RuntimeError when stream is not a terminal, programs using inkey() to block indefinitely if a keyboard is not attached. #69 .
deprecated: using argument _intr_continue to method kbhit() , behavior is as though such value is always True since 1.9.
bugfix: Now imports on 3.10+
bugfix: Fix detection of shift+arrow keys when using tmux. #178 .
enhancement: Instantiate SequenceTextWrapper only once in wrap() . #184 .
introduced: hyperlinks, method ~Terminal.link, 116. * introduced: 24-bit color support, detected by term.number_of_colors == 1 << 24, and 24-bit
color foreground method ~Terminal.color_rgb and background method ~Terminal.on_color_rgb, as well as 676 common X11 color attribute names are now possible, such as term.aquamarine_on_wheat, 60.
introduced: term.move_xy, recommended over built-in move capability, as the argument order, (x, y) matches the return value of ~.Terminal.get_location, and all other common graphics library calls, 65.
introduced: ~.Terminal.move_up, ~Terminal.move_down, Terminal.move_left, ~Terminal.move_right which are strings that move the cursor one cell in the respective direction, are now also callables for moving n cells to the given direction, such as term.move_right(9).
introduced: ~Terminal.pixel_width and ~Terminal.pixel_height for libsixel support or general curiosity.
introduced: ~.Terminal.formatter which returns callable formatters for valid text formatters such as 'red' or 'bold_on_red', returning a ~blessed.formatters.NullCallableString if passed an invalid text formatter.
bugfix: prevent ValueError: I/O operation on closed file on sys.stdin in multiprocessing environments, where the keyboard wouldn't work, anyway.
bugfix: prevent error condition, ValueError: underlying buffer has been detached in rare conditions where sys.__stdout__ has been detached in test frameworks. 126.
bugfix: off-by-one error in ~.Terminal.get_location, now accounts for %i in cursor_report, 94.
bugfix ~Terminal.split_seqs and related functions failed to match when the color index was greater than 15, 101.
bugfix: Context Managers, ~.Terminal.fullscreen, ~.Terminal.hidden_cursor, and ~Terminal.keypad now flush the stream after writing their sequences.
bugfix: chr(127), \x7f has changed from keycode term.DELETE to the more common match, term.BACKSPACE, 115 by jwezel.
bugfix: ensure ~.FormattingOtherString may be pickled.
bugfix: Use UTF-8 for keyboard if input encoding cannot be determined.
deprecated: the curses move() capability is no longer recommended, suggest to use ~.Terminal.move_xy(), which matches the return value of ~.Terminal.get_location.
deprecated: superscript, subscript, shadow, and dim are no longer "compoundable" with colors, such as in phrase Terminal.blue_subscript('a'). These attributes are not typically supported, anyway. Use Unicode text or 256 or 24-bit color codes instead.
deprecated: additional key names, such as KEY_TAB, are no longer "injected" into the curses module namespace.
bugfix: briefly tried calling curses.setupterm with os.devnull as the file descriptor, reverted. 59.
deprecated: ~Terminal.inkey no longer raises RuntimeError when ~Terminal.stream is not a terminal, programs using ~Terminal.inkey to block indefinitely if a keyboard is not attached. 69.
deprecated: using argument _intr_continue to method ~Terminal.kbhit, behavior is as though such value is always True since 1.9.
bugfix: Now imports on 3.10+
bugfix: Fix detection of shift+arrow keys when using tmux. 178.
enhancement: Instantiate SequenceTextWrapper only once in ~.Terminal.wrap. 184.
merge #112 to resolve locale issues on windows with python2
- introduced: Windows support?! PR #110 by avylove .
introduced: Windows support?! PR #110 by avylove .
- enhancement: disable timing integration tests for keyboard routines.
enhancement: disable timing integration tests for keyboard routines.
enhancement: Support python 3.7. PR #102 .
enhancement: Various fixes to test automation PR #108
bugfix: TypeError when using PYTHONOPTIMIZE=2 environment variable, issue #84.
PYTHONOPTIMIZE=2 environment variable, issue #84.
blessed.__version__ value, issue #92.\x1b[0K and \x1b2K, issue #95.bugfix: TypeError when using PYTHONOPTIMIZE=2 environment variable, issue #84.
PYTHONOPTIMIZE=2 environment variable, issue #84.bugfix: term.wrap misbehaved for text containing newlines, #74
bugfix: wrap() misbehaved for text containing newlines, #74 .
bugfix: TypeError when using PYTHONOPTIMIZE=2 environment variable, #84 .
bugfix: define blessed.version value, #92 .
bugfix: detect sequences \x1b[0K and \x1b2K , #95 .
deprecated: function blessed.sequences.measure_length superseded by blessed.sequences.iter_parse if necessary.
Terminal.split_seqs introduced, and 4x cost reduction in related sequence-aware functions, #29.blessed.sequences.measure_length superseded by blessed.sequences.iter_parse if necessary.enhancement: split_seqs() introduced, and 4x cost reduction in related sequence-aware functions, #29 .
deprecated: blessed.sequences.measure_length function superseded by iter_parse() if necessary.
deprecated: warnings about “binary-packed capabilities” are no longer emitted on strange terminal types, making best effort.
enhancement: method Terminal.get_locationreturns the(row, col)`` position of the cursor at the time of call for attached terminal.
returns the(row, col)`` position of the cursor at the time of call for attached terminal.stream is sys.stderr.position of the cursor at the time of call for attached terminal.
enhancement: a keyboard now detected as stdin when ~.Terminal.__init__.stream is sys.stderr.
enhancement: Terminal.inkey method can return more quickly for combinations such as Alt + Z when MetaSendsEscape is enabled, #30
enhancement: Terminal.inkey method can return more quickly for combinations such as Alt + Z when MetaSendsEscape is enabled, #30
enhancement: ~.FormattingString may now be nested, such as t.red('red', t.underline('rum')), #61
One column per quarter.