Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/pippy/console.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/library/pippy/console.py b/library/pippy/console.py
index 1a00c89..3500093 100644
--- a/library/pippy/console.py
+++ b/library/pippy/console.py
@@ -1,10 +1,14 @@
"""Console helpers for pippy."""
-import sys
+import sys, commands
def clear():
"""Clear screen on console."""
# magic escape sequence
sys.stdout.write('\x1B[H\x1B[J')
+def size():
+ """Return the number of rows/columns in the current VTE widget."""
+ return commands.getoutput("stty size")
+
def red():
"""Change text color to red."""
# magic escape sequence.