diff options
author | jquast <contact@jeffquast.com> | 2014-03-23 18:10:40 -0700 |
---|---|---|
committer | jquast <contact@jeffquast.com> | 2014-03-23 18:10:40 -0700 |
commit | 90876b1d524c04969051d425860a705262954c33 (patch) | |
tree | 9b9cd11a310843252aebf645b3ee91c60b94c95f /blessed | |
parent | a4b83a6b149cb90ddd4e08195c187561c0b83748 (diff) | |
download | blessings-90876b1d524c04969051d425860a705262954c33.tar.gz |
docfixes
Diffstat (limited to 'blessed')
-rw-r--r-- | blessed/formatters.py | 1 | ||||
-rw-r--r-- | blessed/keyboard.py | 14 | ||||
-rw-r--r-- | blessed/sequences.py | 34 |
3 files changed, 28 insertions, 21 deletions
diff --git a/blessed/formatters.py b/blessed/formatters.py index 620450c..a7bd021 100644 --- a/blessed/formatters.py +++ b/blessed/formatters.py @@ -54,6 +54,7 @@ class ParameterizingString(unicode): class FormattingString(unicode): """A Unicode string which can be called using ``text``, returning a new string, ``attr`` + ``text`` + ``normal``:: + style = FormattingString(term.bright_blue, term.normal) style('Big Blue') '\x1b[94mBig Blue\x1b(B\x1b[m' diff --git a/blessed/keyboard.py b/blessed/keyboard.py index 8d62ae1..7e9a9af 100644 --- a/blessed/keyboard.py +++ b/blessed/keyboard.py @@ -76,13 +76,13 @@ def get_keyboard_codes(): values and their mnemonic name. Such as key 260, with the value of its identity, 'KEY_LEFT'. These are derived from the attributes by the same of the curses module, with the following exceptions: - * KEY_DELETE in place of KEY_DC - * KEY_INSERT in place of KEY_IC - * KEY_PGUP in place of KEY_PPAGE - * KEY_PGDOWN in place of KEY_NPAGE - * KEY_ESCAPE in place of KEY_EXIT - * KEY_SUP in place of KEY_SR - * KEY_SDOWN in place of KEY_SF + * KEY_DELETE in place of KEY_DC + * KEY_INSERT in place of KEY_IC + * KEY_PGUP in place of KEY_PPAGE + * KEY_PGDOWN in place of KEY_NPAGE + * KEY_ESCAPE in place of KEY_EXIT + * KEY_SUP in place of KEY_SR + * KEY_SDOWN in place of KEY_SF """ keycodes = OrderedDict(get_curses_keycodes()) keycodes.update(CURSES_KEYCODE_OVERRIDE_MIXIN) diff --git a/blessed/sequences.py b/blessed/sequences.py index 161aa21..cf080f5 100644 --- a/blessed/sequences.py +++ b/blessed/sequences.py @@ -63,20 +63,26 @@ def init_sequence_patterns(term): and parses several known terminal capabilities, and builds a database of regular expressions and attaches them to ``term`` as attributes: - ``_re_will_move``: any sequence matching this pattern will - cause the terminal cursor to move (such as term.home). - ``_re_wont_move``: any sequence matching this pattern will - not cause the cursor to move (such as term.bold). - ``_re_cuf``: regular expression that matches term.cuf(N) - (move N characters forward). - ``_cuf1``: term.cuf1 sequence (cursor forward 1 character) - as a static value. - ``_re_cub``: regular expression that matches term.cub(N) - (move N characters backward). - ``_cub1``: term.cuf1 sequence (cursor backward 1 character) - as a static value. - - These attribtues make it possible to perform introspection on + ``_re_will_move`` + any sequence matching this pattern will cause the terminal + cursor to move (such as *term.home*). + ``_re_wont_move`` + any sequence matching this pattern will not cause the cursor + to move (such as *term.bold*). + ``_re_cuf`` + regular expression that matches term.cuf(N) (move N characters + forward). + ``_cuf1`` + *term.cuf1* sequence (cursor forward 1 character) as a static + value. + ``_re_cub`` + regular expression that matches term.cub(N) (move N characters + backward). + ``_cub1`` + *term.cuf1* sequence (cursor backward 1 character) as a static + value. + + These attributes make it possible to perform introspection on strings containing sequences generated by this terminal, to determine the printable length of a string. |