summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--NEWS3
-rw-r--r--README20
-rw-r--r--paramiko/__init__.py6
-rw-r--r--paramiko/client.py4
-rw-r--r--requirements.txt2
-rw-r--r--tox.ini6
7 files changed, 21 insertions, 21 deletions
diff --git a/.gitignore b/.gitignore
index 5f9c3d74..4b578950 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
*.pyc
build/
dist/
+.tox/
paramiko.egg-info/
test.log
docs/
diff --git a/NEWS b/NEWS
index 1cfaa7e7..0fe99f5a 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,9 @@ Releases
v1.10.0 (DD MM YYYY)
--------------------
+* #115: Add convenience `get_pty` kwarg to `Client.exec_command` so users not
+ manually controlling a channel object can still toggle PTY creation. Thanks
+ to Michael van der Kolff for the patch.
* #71: Add `SFTPClient.putfo` and `.getfo` methods to allow direct
uploading/downloading of file-like objects. Thanks to Eric Buehl for the
patch.
diff --git a/README b/README
index 9e9cc3a7..310a7f02 100644
--- a/README
+++ b/README
@@ -5,7 +5,7 @@ paramiko
:Paramiko: Python SSH module
:Copyright: Copyright (c) 2003-2009 Robey Pointer <robeypointer@gmail.com>
-:Copyright: Copyright (c) 2012 Jeff Forcier <jeff@bitprophet.org>
+:Copyright: Copyright (c) 2013 Jeff Forcier <jeff@bitprophet.org>
:License: LGPL
:Homepage: https://github.com/paramiko/paramiko/
@@ -20,7 +20,7 @@ What
----
"paramiko" is a combination of the esperanto words for "paranoid" and
-"friend". it's a module for python 2.2+ that implements the SSH2 protocol
+"friend". it's a module for python 2.5+ that implements the SSH2 protocol
for secure (encrypted and authenticated) connections to remote machines.
unlike SSL (aka TLS), SSH2 protocol does not require hierarchical
certificates signed by a powerful central authority. you may know SSH2 as
@@ -39,8 +39,7 @@ that should have come with this archive.
Requirements
------------
- - python 2.3 or better <http://www.python.org/>
- (python 2.2 is also supported, but not recommended)
+ - python 2.5 or better <http://www.python.org/>
- pycrypto 2.1 or better <https://www.dlitz.net/software/pycrypto/>
If you have setuptools, you can build and install paramiko and all its
@@ -58,19 +57,6 @@ should also work on Windows, though i don't test it as frequently there.
if you run into Windows problems, send me a patch: portability is important
to me.
-python 2.2 may work, thanks to some patches from Roger Binns. things to
-watch out for:
-
- * sockets in 2.2 don't support timeouts, so the 'select' module is
- imported to do polling.
- * logging is mostly stubbed out. it works just enough to let paramiko
- create log files for debugging, if you want them. to get real logging,
- you can backport python 2.3's logging package. Roger has done that
- already:
- http://sourceforge.net/project/showfiles.php?group_id=75211&package_id=113804
-
-you really should upgrade to python 2.3. laziness is no excuse! :)
-
some python distributions don't include the utf-8 string encodings, for
reasons of space (misdirected as that is). if your distribution is
missing encodings, you'll see an error like this::
diff --git a/paramiko/__init__.py b/paramiko/__init__.py
index 7d7dcbf4..e2b359fb 100644
--- a/paramiko/__init__.py
+++ b/paramiko/__init__.py
@@ -18,7 +18,7 @@
"""
I{Paramiko} (a combination of the esperanto words for "paranoid" and "friend")
-is a module for python 2.3 or greater that implements the SSH2 protocol for
+is a module for python 2.5 or greater that implements the SSH2 protocol for
secure (encrypted and authenticated) connections to remote machines. Unlike
SSL (aka TLS), the SSH2 protocol does not require hierarchical certificates
signed by a powerful central authority. You may know SSH2 as the protocol that
@@ -50,8 +50,8 @@ Website: U{https://github.com/paramiko/paramiko/}
import sys
-if sys.version_info < (2, 2):
- raise RuntimeError('You need python 2.2 for this module.')
+if sys.version_info < (2, 5):
+ raise RuntimeError('You need python 2.5+ for this module.')
__author__ = "Jeff Forcier <jeff@bitprophet.org>"
diff --git a/paramiko/client.py b/paramiko/client.py
index a777b45b..f8638068 100644
--- a/paramiko/client.py
+++ b/paramiko/client.py
@@ -349,7 +349,7 @@ class SSHClient (object):
self._agent.close()
self._agent = None
- def exec_command(self, command, bufsize=-1, timeout=None):
+ def exec_command(self, command, bufsize=-1, timeout=None, get_pty=False):
"""
Execute a command on the SSH server. A new L{Channel} is opened and
the requested command is executed. The command's input and output
@@ -368,6 +368,8 @@ class SSHClient (object):
@raise SSHException: if the server fails to execute the command
"""
chan = self._transport.open_session()
+ if(get_pty):
+ chan.get_pty()
chan.settimeout(timeout)
chan.exec_command(command)
stdin = chan.makefile('wb', bufsize)
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 00000000..75112a23
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+pycrypto
+tox
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 00000000..6cb80012
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,6 @@
+[tox]
+envlist = py25,py26,py27
+
+[testenv]
+commands = pip install --use-mirrors -q -r requirements.txt
+ python test.py