summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Rose <erik@mozilla.com>2011-11-07 03:36:33 -0800
committerErik Rose <erik@mozilla.com>2011-11-07 03:36:33 -0800
commit709bb409cdf605e9091e235551bb81c518a160d6 (patch)
tree5613a5a31a297ecf66f93131c76c7f60eb637b77
parent1d22bce25ab789d56d3c2f2d2c481d450e2a8b77 (diff)
downloadblessings-709bb409cdf605e9091e235551bb81c518a160d6.tar.gz
Tweak readme to have fewer forward references. Make tagline mention formatting, because nobody knows what a "capability" is.
-rw-r--r--README.rst34
-rw-r--r--setup.py2
2 files changed, 18 insertions, 18 deletions
diff --git a/README.rst b/README.rst
index f135156..8a3414f 100644
--- a/README.rst
+++ b/README.rst
@@ -79,7 +79,7 @@ Lots of handy formatting codes ("capabilities" in low-level parlance) are
available as attributes on ``Terminal`` instances. For example::
from terminator import Terminal
-
+
term = Terminal()
print 'I am ' + term.bold + 'bold' + term.normal + '!'
@@ -116,7 +116,7 @@ all the time, we simply make such capabilities into callable strings. You can
pass the parameters right in::
from terminator import Terminal
-
+
term = Terminal()
print 'I am ' + term.color(2) + 'green' + term.normal + '!'
@@ -130,27 +130,13 @@ on the `terminfo man page`_ by the name under the "Cap-name" column.
.. _`terminfo man page`: http://www.manpagez.com/man/5/terminfo/
-Temporary Repositioning
------------------------
-
-Sometimes you need to flit to a certain location, print something, and then
-return: for example, when updating a progress bar at the bottom of the screen.
-``Terminal`` provides a context manager for doing this concisely::
-
- from terminator import Terminal
-
- term = Terminal()
- with term.location(0, term.height):
- print 'Here is the bottom.'
- print 'This is back where I came from.'
-
Height and Width
----------------
It's simple to get the height and width of the terminal, in characters::
from terminator import Terminal
-
+
term = Terminal()
height = term.height
width = term.width
@@ -158,6 +144,20 @@ It's simple to get the height and width of the terminal, in characters::
These are newly updated each time you ask for them, so they're safe to use from
SIGWINCH handlers.
+Temporary Repositioning
+-----------------------
+
+Sometimes you need to flit to a certain location, print something, and then
+return: for example, when updating a progress bar at the bottom of the screen.
+``Terminal`` provides a context manager for doing this concisely::
+
+ from terminator import Terminal
+
+ term = Terminal()
+ with term.location(0, term.height):
+ print 'Here is the bottom.'
+ print 'This is back where I came from.'
+
Pipe Savvy
----------
diff --git a/setup.py b/setup.py
index 9ca6184..01cb33b 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ if sys.version_info >= (3,):
setup(
name='terminator',
version='1.0.1',
- description='A thin, practical wrapper around terminal capabilities',
+ description='A thin, practical wrapper around terminal formatting, positioning, and more',
long_description=open('README.rst').read(),
author='Erik Rose',
author_email='erikrose@grinchcentral.com',