diff options
author | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2003-03-12 21:33:28 +0000 |
---|---|---|
committer | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2003-03-12 21:33:28 +0000 |
commit | 24e4cb8eb4412719747666b9f10e11c12258b40d (patch) | |
tree | a66b51302e7e19296fb5befd3990b832738bc4ee | |
parent | 4dcc5570d8df8e3c5edd1b3b3164027eef168ebd (diff) | |
download | pexpect-24e4cb8eb4412719747666b9f10e11c12258b40d.tar.gz |
foo
git-svn-id: http://pexpect.svn.sourceforge.net/svnroot/pexpect/trunk@165 656d521f-e311-0410-88e0-e7920216d269
-rwxr-xr-x | pexpect/examples/monitor.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pexpect/examples/monitor.py b/pexpect/examples/monitor.py index fbed084..2445476 100755 --- a/pexpect/examples/monitor.py +++ b/pexpect/examples/monitor.py @@ -15,14 +15,14 @@ import pexpect import getpass # -# Some constants +# Some constants. These are regular expressions. # - # This is the prompt we get if SSH does not have the remote host's - # public key stored in the cache yet. -SSH_NEWKEY = 'Are you sure you want to continue connecting (yes/no)?' TERMINAL_PROMPT = 'Terminal type?' TERMINAL_TYPE = 'vt100' COMMAND_PROMPT = '[$#] ' ### This is way too simple for industrial use :-) ... + # This is the prompt we get if SSH does not have + # the remote host's public key stored in the cache. +SSH_NEWKEY = 'Are you sure you want to continue connecting (yes/no)?' print 'Enter the host that you wish to monitor.' @@ -51,8 +51,9 @@ if i == 1: child.sendline (TERMINAL_TYPE) child.expect (COMMAND_PROMPT) -# Now we should be at the command prompt and -# ready to run some commands. +# +# Now we should be at the command prompt and ready to run some commands. +# print print '---------------------------------------' print 'Report of commands run on remote host.' @@ -88,3 +89,4 @@ print child.before child.sendline ('exit') child.expect(pexpect.EOF) + |