summaryrefslogtreecommitdiffhomepage
path: root/demos/interactive.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2014-09-05 10:39:00 -0700
committerJeff Forcier <jeff@bitprophet.org>2014-09-05 10:39:00 -0700
commit0e0460f85942e79c94b7db9d93abdf60bf1dbac4 (patch)
tree152b80b4a2822abcb85136f7fbc7f9263279eb14 /demos/interactive.py
parent683b3c22893be899d2fdbf1ada35e61fba8a3d70 (diff)
parenteb7da84bee49f6e7b568ee00fd5f3db0bb29f36a (diff)
Merge branch 'master' into 131-int
Diffstat (limited to 'demos/interactive.py')
-rw-r--r--demos/interactive.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/demos/interactive.py b/demos/interactive.py
index 4cbc6171..7138cd6c 100644
--- a/demos/interactive.py
+++ b/demos/interactive.py
@@ -7,7 +7,7 @@
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
-# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY
+# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
@@ -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()