Home | History | Annotate | only in /external/lldb/test/pexpect-2.4/examples
Up to higher level directory
NameDateSize
astat.py23-Apr-20151.9K
bd_client.py23-Apr-2015957
bd_serv.py23-Apr-201510K
cgishell.cgi23-Apr-201524.2K
chess.py23-Apr-20153.3K
chess2.py23-Apr-20153.9K
chess3.py23-Apr-20153.7K
df.py23-Apr-2015959
fix_cvs_files.py23-Apr-20152.6K
ftp.py23-Apr-20151.6K
hive.py23-Apr-201517.6K
monitor.py23-Apr-20156.3K
passmass.py23-Apr-20152.9K
python.py23-Apr-2015660
README23-Apr-20153.1K
rippy.py23-Apr-201549.1K
script.py23-Apr-20153K
ssh_session.py23-Apr-20152.8K
ssh_tunnel.py23-Apr-20152.3K
sshls.py23-Apr-20151.8K
table_test.html23-Apr-20153.9K
topip.py23-Apr-20159.4K
uptime.py23-Apr-20152.4K

README

      1 This directory contains scripts that give examples of using Pexpect.
      2 
      3 hive.py
      4     This script creates SSH connections to a list of hosts that
      5     you provide. Then you are given a command line prompt. Each
      6     shell command that you enter is sent to all the hosts. The
      7     response from each host is collected and printed. For example,
      8     you could connect to a dozen different machines and reboot
      9     them all at once.
     10 
     11 script.py
     12     This implements a command similar to the classic BSD "script" command.
     13     This will start a subshell and log all input and output to a file.
     14     This demonstrates the interact() method of Pexpect.
     15 
     16 fix_cvs_files.py
     17     This is for cleaning up binary files improperly added to
     18     CVS. This script scans the given path to find binary files;
     19     checks with CVS to see if the sticky options are set to -kb;
     20     finally if sticky options are not -kb then uses 'cvs admin'
     21     to set the -kb option. 
     22 
     23 ftp.py
     24     This demonstrates an FTP "bookmark".
     25     This connects to an ftp site; does a few ftp commands; and then gives the user
     26     interactive control over the session. In this case the "bookmark" is to a
     27     directory on the OpenBSD ftp server. It puts you in the i386 packages
     28     directory. You can easily modify this for other sites.
     29     This demonstrates the interact() method of Pexpect.
     30 
     31 monitor.py
     32     This runs a sequence of system status commands on a remote host using SSH.
     33     It runs a simple system checks such as uptime and free to monitor
     34     the state of the remote host.
     35 
     36 passmass.py
     37     This will login to a list of hosts and change the password of the
     38     given user. This demonstrates scripting logins; although, you could
     39     more easily do this using the pxssh subclass of Pexpect.
     40     See also the "hive.py" example script for a more general example
     41     of scripting a collection of servers.
     42 
     43 python.py
     44     This starts the python interpreter and prints the greeting message backwards.
     45     It then gives the user interactive control of Python. It's pretty useless!
     46 
     47 rippy.py
     48     This is a wizard for mencoder. It greatly simplifies the process of
     49     ripping a DVD to mpeg4 format (XviD, DivX). It can transcode from any
     50     video file to another. It has options for resampling the audio stream;
     51     removing interlace artifacts, fitting to a target file size, etc.
     52     There are lots of options, but the process is simple and easy to use.
     53 
     54 sshls.py
     55     This lists a directory on a remote machine.
     56 
     57 ssh_tunnel.py
     58     This starts an SSH tunnel to a remote machine. It monitors the connection
     59     and restarts the tunnel if it goes down.
     60 
     61 uptime.py
     62     This will run the uptime command and parse the output into python variables.
     63     This demonstrates using a single regular expression to match the output
     64     of a command and capturing different variable in match groups.
     65     The regular expression takes into account a wide variety of different
     66     formats for uptime output.
     67 
     68 df.py
     69     This collects filesystem capacity info using the 'df' command.
     70     Tuples of filesystem name and percentage are stored in a list.
     71     A simple report is printed. Filesystems over 95% capacity are highlighted.
     72 
     73