summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorErik Rose <erik@mozilla.com>2011-11-15 13:47:19 -0800
committerErik Rose <erik@mozilla.com>2011-11-15 13:47:19 -0800
commite90c368aa79b55a86f77cb03fe071c3515ffbc6b (patch)
tree4aee6c7612a3ea2358fbdc4ffdd616b6c230373a /README.rst
parent8c1e1a701429a2a832be6613c006d626a63dd2ac (diff)
downloadblessings-e90c368aa79b55a86f77cb03fe071c3515ffbc6b.tar.gz
Let location() operate on just an x *or* y coordinate.
Use force_styling in a test so we don't have to mock things anymore.
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst25
1 files changed, 21 insertions, 4 deletions
diff --git a/README.rst b/README.rst
index 0abe5c4..a16d12f 100644
--- a/README.rst
+++ b/README.rst
@@ -110,7 +110,7 @@ certain pieces of formatting, even at the lowest level.
You might notice that the above aren't the typical incomprehensible terminfo
capability names; we alias a few of the harder-to-remember ones for
-readability. However, **all** capabilities are available: you can reference any
+readability. However, you aren't limited to these: you can reference any
string-returning capability listed on the `terminfo man page`_ by the name
under the "Cap-name" column: for example, ``rum``.
@@ -155,10 +155,20 @@ pass the parameters right in::
from blessings import Terminal
term = Terminal()
- print term.create_window(1, 1, 20, 20)
+ print term.move(10, 1)
-You can reference any string-returning capability listed on the `terminfo man
-page`_ by the name under the "Cap-name" column.
+Here are some of interest:
+
+``move``
+ Position the cursor elsewhere. Parameters are y coordinate, then x
+ coordinate.
+``move_x``
+ Move the cursor to the given column.
+``move_y``
+ Move the cursor to the given row.
+
+You can also reference any other string-returning capability listed on the
+`terminfo man page`_ by its name under the "Cap-name" column.
.. _`terminfo man page`: http://www.manpagez.com/man/5/terminfo/
@@ -190,6 +200,12 @@ return: for example, when updating a progress bar at the bottom of the screen.
print 'Here is the bottom.'
print 'This is back where I came from.'
+Parameters to ``location()`` are ``x`` and then ``y``, but you can also pass
+just one of them, leaving the other alone. For example... ::
+
+ with term.location(y=10):
+ print 'We changed just the row.'
+
Pipe Savvy
----------
@@ -252,6 +268,7 @@ Version History
* Added the ``is_a_tty`` attribute for telling whether the output stream is a
terminal.
* Added sugar for the remaining simple formatting capabilities.
+ * Let ``location()`` operate on just an x *or* y coordinate.
1.0
* Extracted Blessings from nose-progressive, my `progress-bar-having,