diff options
author | Erik Rose <erik@mozilla.com> | 2011-11-18 13:28:39 -0800 |
---|---|---|
committer | Erik Rose <erik@mozilla.com> | 2011-11-18 13:28:39 -0800 |
commit | fd2133a29c6fa34b1b3022dd17bf8ebcbd9de6c2 (patch) | |
tree | d5999923f4dce0657cfd460084155b6d8beb0065 | |
parent | 163838a93f4a4fac40ab881b6691bb1cecb6e898 (diff) | |
download | blessings-fd2133a29c6fa34b1b3022dd17bf8ebcbd9de6c2.tar.gz |
Tweak readme and a comment.
-rw-r--r-- | README.rst | 8 | ||||
-rw-r--r-- | blessings/__init__.py | 5 |
2 files changed, 9 insertions, 4 deletions
@@ -177,9 +177,13 @@ everything back to normal afterward:: print term.bold_underline_green_on_yellow('Woo') +This compound notation comes in handy if you want to allow users to customize +the formatting of your app: just have them pass in a format specifier like +"bold_green" on the command line, and do a quick ``getattr(term, +that_option)('Your text')`` when you do your formatting. + I'd be remiss if I didn't credit couleur_, where I probably got the idea for -all this mashing. It doesn't mix non-color styles in, but we started at the -same place. +all this mashing. .. _couleur: http://pypi.python.org/pypi/couleur diff --git a/blessings/__init__.py b/blessings/__init__.py index 548d5b8..6b5c188 100644 --- a/blessings/__init__.py +++ b/blessings/__init__.py @@ -86,8 +86,9 @@ class Terminal(object): # Sugary names for commonly-used capabilities, intended to help avoid trips # to the terminfo man page and comments in your code: _sugar = dict( - # Don't use "on" as an underscore-separated chunk in any of these (e.g. - # on_cology or rock_on) so we don't interfere with __getattr__. + # Don't use "on" or "bright" as an underscore-separated chunk in any of + # these (e.g. on_cology or rock_on) so we don't interfere with + # __getattr__. save='sc', restore='rc', |