summaryrefslogtreecommitdiff
path: root/python/qpid-python-test
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
commit20fd4f94fa8ce40e3b2f79cc04358c32c8acc8fc (patch)
tree8372b71db7dce2268c0d43629af5b7f761444dd9 /python/qpid-python-test
parent4d1172e4903e1902b3ba8a6c9e9b47bc3f7aa7e8 (diff)
downloadqpid-python-20fd4f94fa8ce40e3b2f79cc04358c32c8acc8fc.tar.gz
added a signal handler for terminal resize
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@781091 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid-python-test')
-rwxr-xr-xpython/qpid-python-test7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/qpid-python-test b/python/qpid-python-test
index d02f2ac6cc..8d56311dbe 100755
--- a/python/qpid-python-test
+++ b/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))