summaryrefslogtreecommitdiff
path: root/pexpect/run.py
diff options
context:
space:
mode:
Diffstat (limited to 'pexpect/run.py')
-rw-r--r--pexpect/run.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pexpect/run.py b/pexpect/run.py
index d9dfe76..af73137 100644
--- a/pexpect/run.py
+++ b/pexpect/run.py
@@ -49,7 +49,7 @@ def run(command, timeout=30, withexitstatus=False, events=None,
(command_output, exitstatus) = run('ls -l /bin', withexitstatus=1)
The following will run SSH and execute 'ls -l' on the remote machine. The
- password 'secret' will be sent if the '(?i)password' pattern is ever seen::
+ password 'secret' will be sent if the '(?i)password' pattern is ever seen:
run("ssh username@machine.example.com 'ls -l'",
events={'(?i)password':'secret\\n'})
@@ -67,7 +67,7 @@ def run(command, timeout=30, withexitstatus=False, events=None,
contains patterns and responses. Whenever one of the patterns is seen
in the command output, run() will send the associated response string.
So, run() in the above example can be also written as:
-
+
run("mencoder dvd://1 -o video.avi -oac copy -ovc copy",
events=[(TIMEOUT,print_ticks)], timeout=5)