aboutsummaryrefslogtreecommitdiff
path: root/demos/interactive.py
diff options
context:
space:
mode:
authorJeremy T. Bouse <jbouse@debian.org>2014-05-11 22:30:25 -0400
committerJeremy T. Bouse <jbouse@debian.org>2014-05-11 22:30:25 -0400
commit4e426087436d01fe00a120e5e7ce7a5e0a1e0970 (patch)
tree16b810aaf50263083ca758b6bd70895cba4378a3 /demos/interactive.py
parent3bb46c9cb414ca82afab715d2d0cc00ed71cfb6d (diff)
downloadpython-paramiko-4e426087436d01fe00a120e5e7ce7a5e0a1e0970.tar
python-paramiko-4e426087436d01fe00a120e5e7ce7a5e0a1e0970.tar.gz
Imported Upstream version 1.14.0upstream/1.14.0
Diffstat (limited to 'demos/interactive.py')
-rw-r--r--demos/interactive.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/demos/interactive.py b/demos/interactive.py
index f3be74d..7138cd6 100644
--- a/demos/interactive.py
+++ b/demos/interactive.py
@@ -19,6 +19,7 @@
import socket
import sys
+from paramiko.py3compat import u
# windows does not have termios...
try:
@@ -49,9 +50,9 @@ def posix_shell(chan):
r, w, e = select.select([chan, sys.stdin], [], [])
if chan in r:
try:
- x = chan.recv(1024)
+ x = u(chan.recv(1024))
if len(x) == 0:
- print '\r\n*** EOF\r\n',
+ sys.stdout.write('\r\n*** EOF\r\n')
break
sys.stdout.write(x)
sys.stdout.flush()