summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-06-02 17:41:11 +0000
committerRafael H. Schloming <rhs@apache.org>2009-06-02 17:41:11 +0000
commitfa5e48e323ec34e10674f7419287470e35dbfff1 (patch)
tree34872e4576bdb53ffa2b2a9ba946bd2cdbfcfe5d
parentb40a5efb567758c0aef5358de3c9ec88a5e5c7ab (diff)
downloadqpid-python-fa5e48e323ec34e10674f7419287470e35dbfff1.tar.gz
added a signal handler for terminal resize
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@781091 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xqpid/python/qpid-python-test7
1 files changed, 7 insertions, 0 deletions
diff --git a/qpid/python/qpid-python-test b/qpid/python/qpid-python-test
index d02f2ac6cc..8d56311dbe 100755
--- a/qpid/python/qpid-python-test
+++ b/qpid/python/qpid-python-test
@@ -110,6 +110,13 @@ def width():
WIDTH = width()
+def resize(sig, frm):
+ global WIDTH
+ WIDTH = width()
+
+import signal
+signal.signal(signal.SIGWINCH, resize)
+
def vt100_attrs(*attrs):
return "\x1B[%sm" % ";".join(map(str, attrs))