diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-09-22 12:43:43 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-09-22 14:21:18 -0400 |
commit | 8ec35a8a7ce2186c5f134db5cec04f5fc0e740ac (patch) | |
tree | cb4e0bae63376c772eccd55f6ce2480c3a151737 /termcast_client.py | |
parent | 58585d3002c3a8fc9d5cd81a3d56531f5484527c (diff) | |
download | python-termcast-client-8ec35a8a7ce2186c5f134db5cec04f5fc0e740ac.tar.gz python-termcast-client-8ec35a8a7ce2186c5f134db5cec04f5fc0e740ac.zip |
need to override some stuff in the core pty module
hopefully this can make its way upstream eventually
(pity as in "it's such a pity i had to write this code *again*")
Diffstat (limited to 'termcast_client.py')
-rw-r--r-- | termcast_client.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/termcast_client.py b/termcast_client.py index 661f803..2e6ad6c 100644 --- a/termcast_client.py +++ b/termcast_client.py @@ -1,7 +1,7 @@ import argparse import json import os -import pty +import pity import shutil import socket import sys @@ -17,7 +17,11 @@ class Client(object): sock = socket.socket() sock.connect((self.host, self.port)) sock.send(self._build_connection_string()) - pty.spawn(argv, lambda fd: self._master_read(fd, sock)) + pity.spawn( + argv, + lambda fd: self._master_read(fd, sock), + handle_window_size=True + ) def _master_read(self, fd, sock): data = os.read(fd, 1024) |