summaryrefslogtreecommitdiff
path: root/pexpect
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2014-01-23 15:36:39 -0800
committerThomas Kluyver <takowl@gmail.com>2014-01-23 15:36:39 -0800
commitbb6ba03af13f8b3adfc64c3986ca522f634befbc (patch)
treed79e109c02094ad02f187645b468cde595b63e12 /pexpect
parent13ec3b0e134159d0168811862a9d7980847ca4e0 (diff)
downloadpexpect-bb6ba03af13f8b3adfc64c3986ca522f634befbc.tar.gz
Fix documentation of using auto_prompt_reset.
Closes gh-35
Diffstat (limited to 'pexpect')
-rw-r--r--pexpect/pxssh.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pexpect/pxssh.py b/pexpect/pxssh.py
index a068625..7c187d4 100644
--- a/pexpect/pxssh.py
+++ b/pexpect/pxssh.py
@@ -118,7 +118,6 @@ class pxssh (spawn):
# Unsetting SSH_ASKPASS on the remote side doesn't disable it! Annoying!
#self.SSH_OPTS = "-x -o'RSAAuthentication=no' -o 'PubkeyAuthentication=no'"
self.force_password = False
- self.auto_prompt_reset = True
def levenshtein_distance(self, a,b):
@@ -233,7 +232,7 @@ class pxssh (spawn):
then login() raises an :class:`ExceptionPxssh` exception.
In some situations it is not possible or desirable to reset the
- original prompt. In this case, set :attr:`auto_prompt_reset` to False to
+ original prompt. In this case, pass ``auto_prompt_reset=False`` to
inhibit setting the prompt to the UNIQUE_PROMPT. Remember that pxssh
uses a unique prompt in the prompt() method. If the original prompt is
not reset then this will disable the prompt() method unless you
@@ -333,12 +332,12 @@ class pxssh (spawn):
self.expect(EOF)
self.close()
- def prompt (self, timeout=-1):
+ def prompt(self, timeout=-1):
'''This matches the shell prompt. This is little more than a short-cut
to the expect() method. This returns True if the shell prompt was
matched. This returns False if a timeout was raised. Note that if you
- called :meth:`login` with :attr:`auto_prompt_reset` set to False then
+ called :meth:`login` with ``auto_prompt_reset=False`` then
before calling :meth:`prompt` you must set the :attr:`PROMPT` attribute
to a regex that it will use for matching the prompt.