diff options
author | Red_M <1468433+Red-M@users.noreply.github.com> | 2019-07-07 20:36:49 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-07 20:36:49 +1000 |
commit | 59e8768f8a9bbd213bc2fc5e063feb7115f13404 (patch) | |
tree | 0d22d0188859ff345ae040e45be8ac49c746fd9f /doc | |
parent | 01f2acca9ac4a8ebcfe440812d25a72f5be3e892 (diff) | |
parent | 121ca37789bd22cadf2e6f7cf1ee78c5a458f217 (diff) | |
download | pexpect-git-59e8768f8a9bbd213bc2fc5e063feb7115f13404.tar.gz |
Merge pull request #8 from pexpect/master
updates
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/pxssh.rst | 8 | ||||
-rw-r--r-- | doc/commonissues.rst | 8 | ||||
-rw-r--r-- | doc/conf.py | 2 | ||||
-rw-r--r-- | doc/history.rst | 18 | ||||
-rw-r--r-- | doc/overview.rst | 5 |
5 files changed, 35 insertions, 6 deletions
diff --git a/doc/api/pxssh.rst b/doc/api/pxssh.rst index b947f4b..c9c80c6 100644 --- a/doc/api/pxssh.rst +++ b/doc/api/pxssh.rst @@ -1,6 +1,14 @@ pxssh - control an SSH session ============================== +.. note:: + + *pxssh* is a screen-scraping wrapper around the SSH command on your system. + In many cases, you should consider using + `Paramiko <https://github.com/paramiko/paramiko>`_ instead. + Paramiko is a Python module which speaks the SSH protocol directly, so it + doesn't have the extra complexity of running a local subprocess. + .. automodule:: pexpect.pxssh .. autoclass:: ExceptionPxssh diff --git a/doc/commonissues.rst b/doc/commonissues.rst index f60085e..c74ea7a 100644 --- a/doc/commonissues.rst +++ b/doc/commonissues.rst @@ -41,10 +41,10 @@ back to the TTY. I would call this an SSH bug. Pexpect now automatically adds a short delay before sending data to a child process. This more closely mimics what happens in the usual human-to-app -interaction. The delay can be tuned with the ``delaybeforesend`` attribute of the -spawn class. In general, this fixes the problem for everyone and so this should -not be an issue for most users. For some applications you might with to turn it -off:: +interaction. The delay can be tuned with the ``delaybeforesend`` attribute of +objects of the spawn class. In general, this fixes the problem for everyone and so +this should not be an issue for most users. For some applications you might with +to turn it off:: child = pexpect.spawn ("ssh user@example.com") child.delaybeforesend = None diff --git a/doc/conf.py b/doc/conf.py index a734147..166300e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -52,7 +52,7 @@ copyright = u'2013, Noah Spurrier and contributors' # built documents. # # The short X.Y version. -version = '4.6' +version = '4.7' # The full version, including alpha/beta/rc tags. release = version diff --git a/doc/history.rst b/doc/history.rst index 41a5918..b3b0ff1 100644 --- a/doc/history.rst +++ b/doc/history.rst @@ -4,6 +4,24 @@ History Releases -------- +Version 4.7 +``````````` + +* The :meth:`.pxssh.login` method now no longer requires a username if an ssh + config is provided and will raise an error if neither are provided. + (:ghpull:`562`). +* The :meth:`.pxssh.login` method now supports providing your own ``ssh`` + command via the ``cmd`` parameter. + (:ghpull:`528`) (:ghpull:`563`). +* :class:`.pxssh` now supports the ``use_poll`` parameter which is passed into :meth:`.pexpect.spawn` + (:ghpull:`542`). +* Minor bug fix with ``ssh_config``. + (:ghpull:`498`). +* :meth:`.replwrap.run_command` now has async support via an ``async_`` parameter. + (:ghpull:`501`). +* :meth:`.pexpect.spawn` will now read additional bytes if able up to a buffer limit. + (:ghpull:`304`). + Version 4.6 ``````````` diff --git a/doc/overview.rst b/doc/overview.rst index e52809c..aeb8887 100644 --- a/doc/overview.rst +++ b/doc/overview.rst @@ -207,7 +207,10 @@ It is also useful to log the child's input and out to a file or the screen. The following will turn on logging and send output to stdout (the screen):: child = pexpect.spawn(foo) - child.logfile = sys.stdout + child.logfile = sys.stdout.buffer + +The `sys.stdout.buffer` object is available since Python 3. With Python 2, one +has to assign just `sys.stdout` instead. Exceptions ---------- |