Version History

1.15
  • disable timing integration tests for keyboard routines.

    They work perfectly fine for regression testing for contributing developers, but people run our tests on build farms and open issues when they fail. So we comment out these useful tests. #100.

  • Support python 3.7. #102.

  • Various fixes to test automation #108

1.14
  • 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.
1.13
  • 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.
1.12
  • enhancement: get_location() returns the (row, col) position of the cursor at the time of call for attached terminal.
  • enhancement: a keyboard now detected as stdin when stream is sys.stderr.
1.11
  • enhancement: inkey() 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
1.10
  • workaround: provide sc and rc for Terminals of kind='ansi', repairing location() #44.
  • bugfix: length of simple SGR reset sequence \x1b[m was not correctly determined on all terminal types, #45.
  • deprecated: _intr_continue arguments introduced in 1.8 are now marked deprecated in 1.10: beginning with python 3.5, the default behavior is as though this argument is always True, PEP-475, blessed does the same.
1.9
  • enhancement: break_long_words now supported by Terminal.wrap()
  • Ignore curses.error message 'tparm() returned NULL': this occurs on win32 or other platforms using a limited curses implementation, such as PDCurses, where curses.tparm() is not implemented, or no terminal capability database is available.
  • Context manager keypad() emits sequences that enable “application keys” such as the diagonal keys on the numpad. This is equivalent to curses.window.keypad().
  • bugfix: translate keypad application keys correctly.
  • enhancement: no longer depend on the ‘2to3’ tool for python 3 support.
  • enhancement: allow civis and cnorm (hide_cursor, normal_hide) to work with terminal-type ansi by emulating support by proxy.
  • enhancement: new public attribute: kind: the very same as given Terminal.__init__.kind keyword argument. Or, when not given, determined by and equivalent to the TERM Environment variable.
1.8
  • enhancement: export keyboard-read function as public method getch(), so that it may be overridden by custom terminal implementers.
  • enhancement: allow inkey() and kbhit() to return early when interrupted by signal by passing argument _intr_continue=False.
  • enhancement: allow hpa and vpa (move_x, move_y) to work on tmux(1) or screen(1) by emulating support by proxy.
  • enhancement: add rstrip() and lstrip(), strips both sequences and trailing or leading whitespace, respectively.
  • enhancement: include wcwidth library support for length(): the printable width of many kinds of CJK (Chinese, Japanese, Korean) ideographs and various combining characters may now be determined.
  • enhancement: better support for detecting the length or sequences of externally-generated ecma-48 codes when using xterm or aixterm.
  • bugfix: when locale.getpreferredencoding() returns empty string or an encoding that is not valid for codecs.getincrementaldecoder, fallback to ASCII and emit a warning.
  • bugfix: ensure FormattingString and ParameterizingString may be pickled.
  • bugfix: allow ~.inkey and related to be called without a keyboard.
  • change: term.keyboard_fd is set None if stream or sys.stdout is not a tty, making term.inkey(), term.cbreak(), term.raw(), no-op.
  • bugfix: \x1bOH (KEY_HOME) was incorrectly mapped as KEY_LEFT.
1.7
  • Forked github project erikrose/blessings to jquast/blessed, this project was previously known as blessings version 1.6 and prior.
  • introduced: context manager cbreak(), which is equivalent to entering terminal state by tty.setcbreak() and returning on exit, as well as the lesser recommended raw(), pairing from tty.setraw().
  • introduced: inkey(), which will return one or more characters received by the keyboard as a unicode sequence, with additional attributes code and name. This allows application keys (such as the up arrow, or home key) to be detected. Optional value timeout allows for timed poll.
  • introduced: center(), rjust(), ljust(), allowing text containing sequences to be aligned to detected horizontal screen width, or by width specified.
  • introduced: wrap() method. Allows text containing sequences to be word-wrapped without breaking mid-sequence, honoring their printable width.
  • introduced: strip(), strips all sequences and whitespace.
  • introduced: strip_seqs() strip only sequences.
  • introduced: rstrip() and lstrip() strips both sequences and trailing or leading whitespace, respectively.
  • bugfix: cannot call curses.setupterm() more than once per process (from Terminal.__init__()): Previously, blessed pretended to support several instances of different Terminal kind, but was actually using the kind specified by the first instantiation of Terminal. A warning is now issued. Although this is misbehavior is still allowed, a warnings.WarningMessage is now emitted to notify about subsequent terminal misbehavior.
  • bugfix: resolved issue where number_of_colors fails when does_styling is False. Resolves issue where piping tests output would fail.
  • bugfix: warn and set does_styling to False when the given kind is not found in the terminal capability database.
  • bugfix: allow unsupported terminal capabilities to be callable just as supported capabilities, so that the return value of color(n) may be called on terminals without color capabilities.
  • bugfix: for terminals without underline, such as vt220, term.underline('text') would emit 'text' + term.normal. Now it emits only 'text'.
  • enhancement: some attributes are now properties, raise exceptions when assigned.
  • enhancement: pypy is now a supported python platform implementation.
  • enhancement: removed pokemon curses.error exceptions.
  • enhancement: do not ignore curses.error exceptions, unhandled curses errors are legitimate errors and should be reported as a bug.
  • enhancement: converted nose tests to pytest, merged travis and tox.
  • enhancement: pytest fixtures, paired with a new @as_subprocess decorator are used to test a multitude of terminal types.
  • enhancement: test accessories @as_subprocess resolves various issues with different terminal types that previously went untested.
  • deprecation: python2.5 is no longer supported (as tox does not supported).
1.6
  • Add does_styling. This takes force_styling into account and should replace most uses of is_a_tty.
  • Make is_a_tty a read-only property like does_styling. Writing to it never would have done anything constructive.
  • Add fullscreen`() and hidden_cursor() to the auto-generated docs.
1.5.1
  • Clean up fabfile, removing the redundant test command.
  • Add Travis support.
  • Make python setup.py test work without spurious errors on 2.6.
  • Work around a tox parsing bug in its config file.
  • Make context managers clean up after themselves even if there’s an exception (Vitja Makarov PR #29).
  • Parameterizing a capability no longer crashes when there is no tty (Vitja Makarov PR #31)
1.5
  • Add syntactic sugar and documentation for enter_fullscreen and exit_fullscreen.
  • Add context managers fullscreen() and hidden_cursor().
  • Now you can force a Terminal to never to emit styles by passing keyword argument force_styling=None.
1.4
  • Add syntactic sugar for cursor visibility control and single-space-movement capabilities.
  • Endorse the location() context manager for restoring cursor position after a series of manual movements.
  • Fix a bug in which location() that wouldn’t do anything when passed zeros.
  • Allow tests to be run with python setup.py test.
1.3
  • Added number_of_colors, which tells you how many colors the terminal supports.
  • Made color(n) and on_color(n) callable to wrap a string, like the named colors can. Also, make them both fall back to the setf and setb capabilities (like the named colors do) if the termcap entries for setaf and setab are not available.
  • Allowed color to act as an unparametrized string, not just a callable.
  • Made height and width examine any passed-in stream before falling back to stdout (This rarely if ever affects actual behavior; it’s mostly philosophical).
  • Made caching simpler and slightly more efficient.
  • Got rid of a reference cycle between Terminal and FormattingString.
  • Updated docs to reflect that terminal addressing (as in location()) is 0-based.
1.2
  • Added support for Python 3! We need 3.2.3 or greater, because the curses library couldn’t decide whether to accept strs or bytes before that (http://bugs.python.org/issue10570).
  • Everything that comes out of the library is now unicode. This lets us support Python 3 without making a mess of the code, and Python 2 should continue to work unless you were testing types (and badly). Please file a bug if this causes trouble for you.
  • Changed to the MIT License for better world domination.
  • Added Sphinx docs.
1.1
  • Added nicely named attributes for colors.
  • Introduced compound formatting.
  • Added wrapper behavior for styling and colors.
  • Let you force capabilities to be non-empty, even if the output stream is not a terminal.
  • Added is_a_tty to determine whether the output stream is a terminal.
  • Sugared the remaining interesting string capabilities.
  • Allow location() to operate on just an x or y coordinate.
1.0