diff options
author | Jeff Quast <contact@jeffquast.com> | 2015-04-26 21:51:20 -0700 |
---|---|---|
committer | Jeff Quast <contact@jeffquast.com> | 2015-04-26 21:51:20 -0700 |
commit | 7f046a6cf86d8f60a6cf23c40ef625e5acbc1a32 (patch) | |
tree | abde38287c6d4d38589d448fab6f53b4561fa7c4 /doc | |
parent | bdfaaee26d2fb9f4bf0891918e6a6039eaf3a4b6 (diff) | |
parent | 82d4937b73a2fc49824e1f60fa0e036731a03135 (diff) | |
download | pexpect-git-7f046a6cf86d8f60a6cf23c40ef625e5acbc1a32.tar.gz |
Merge remote-tracking branch 'origin/master' into document-blocking-write
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/pxssh.rst | 4 | ||||
-rw-r--r-- | doc/commonissues.rst | 12 | ||||
-rw-r--r-- | doc/history.rst | 19 | ||||
-rw-r--r-- | doc/overview.rst | 8 | ||||
-rw-r--r-- | doc/requirements.txt | 1 |
5 files changed, 40 insertions, 4 deletions
diff --git a/doc/api/pxssh.rst b/doc/api/pxssh.rst index 0b67839..b947f4b 100644 --- a/doc/api/pxssh.rst +++ b/doc/api/pxssh.rst @@ -23,6 +23,10 @@ pxssh class server to ask for a password. Note that the sysadmin can disable password logins, in which case this won't work. + .. attribute:: options + + The dictionary of user specified SSH options, eg, ``options = dict(StrictHostKeyChecking="no", UserKnownHostsFile="/dev/null")`` + .. automethod:: login .. automethod:: logout .. automethod:: prompt diff --git a/doc/commonissues.rst b/doc/commonissues.rst index 5e89efd..85b8d00 100644 --- a/doc/commonissues.rst +++ b/doc/commonissues.rst @@ -166,3 +166,15 @@ The only solution I have found is to use public key authentication with SSH. This bypasses the need for a password. I'm not happy with this solution. The problem is due to poor support for Solaris Pseudo TTYs in the Python Standard Library. + +child does not receive full input, emits BEL +-------------------------------------------- + +You may notice when running for example cat(1) or base64(1), when sending a +very long input line, that it is not fully received, and the BEL ('\a') may +be found in output. + +By default the child terminal matches the parent, which is often in "canonical +mode processing". You may wish to disable this mode. The exact limit of a line +varies by operating system, and details of disabling canonical mode may be +found in the docstring of :meth:`~pexpect.spawn.send`. diff --git a/doc/history.rst b/doc/history.rst index 0da6c6e..95bf371 100644 --- a/doc/history.rst +++ b/doc/history.rst @@ -4,6 +4,25 @@ History Releases -------- +Version 4.0 +``````````` + +* Integration with :mod:`asyncio`: passing ``async=True`` to :meth:`~.expect`, + :meth:`~.expect_exact` or :meth:`~.expect_list` will make them return a + coroutine. You can get the result using ``yield from``, or wrap it in an + :class:`asyncio.Task`. This allows the event loop to do other things while + waiting for output that matches a pattern. +* Enhancement: allow method as callbacks of argument ``events`` for + :func:`pexpect.run` (:ghissue:`176`). + +Version 3.4 +``````````` +* Fix regression that prevented executable, but unreadable files from + being found when not specified by absolute path -- such as + /usr/bin/sudo (:ghissue:`104`). +* Fixed regression when executing pexpect with some prior releases of + the multiprocessing module where stdin has been closed (:ghissue:`86`). + Version 3.3 ``````````` diff --git a/doc/overview.rst b/doc/overview.rst index 133767f..76fc846 100644 --- a/doc/overview.rst +++ b/doc/overview.rst @@ -17,7 +17,7 @@ Here is an example of Pexpect in action:: child.expect('ftp> ') child.sendline('lcd /tmp') child.expect('ftp> ') - child.sendline('cd pub') + child.sendline('cd pub/OpenBSD') child.expect('ftp> ') child.sendline('get README') child.expect('ftp> ') @@ -84,13 +84,13 @@ The following code fragment gives an example of this:: # We expect any of these three patterns... i = child.expect (['Permission denied', 'Terminal type', '[#\$] ']) if i==0: - print('Permission denied on host. Can't login') + print('Permission denied on host. Can\'t login') child.kill(0) - elif i==2: + elif i==1: print('Login OK... need to send terminal type.') child.sendline('vt100') child.expect('[#\$] ') - elif i==3: + elif i==2: print('Login OK.') print('Shell command prompt', child.after) diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..57ebb2d --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1 @@ +ptyprocess |