def __init__(self,program,prompts,args=None,out=sys.stdout,echo=True):
self.program = program<EOL>self.prompts = prompts<EOL>if args is None: args = []<EOL>self.args = args<EOL>self.out = out<EOL>self.echo = echo<EOL>self.delaybeforesend = <NUM_LIT:0><EOL>c = self.child = pexpect.spawn(self.program,self.args,timeout=None)<EOL>c.delaybeforesend = self.delaybeforesend<EOL>c.setwinsize(<NUM_LIT>,<NUM_LIT:200>)<EOL>
Construct a runner.

        Inputs:

          - program: command to execute the given program.

          - prompts: a list of patterns to match as valid prompts, in the
          format used by pexpect.  This basically means that it can be either
          a string (to be compiled as a regular expression) or a list of such
          (it must be a true list, as pexpect does type checks).

          If more than one prompt is given, the first is treated as the main
          program prompt and the others as 'continuation' prompts, like
          python's.  This means that blank lines in the input source are
          ommitted when the first prompt is matched, but are NOT ommitted when
          the continuation one matches, since this is how python signals the
          end of multiline input interactively.

        Optional inputs:

          - args(None): optional list of strings to pass as arguments to the
          child program.

          - out(sys.stdout): if given, an output stream to be used when writing
          output.  The only requirement is that it must have a .write() method.

        Public members not parameterized in the constructor:

          - delaybeforesend(0): Newer versions of pexpect have a delay before
          sending each new input.  For our purposes here, it's typically best
          to just set this to zero, but if you encounter reliability problems
          or want an interactive run to pause briefly at each prompt, just
          increase this value (it is measured in seconds).  Note that this
          variable is not honored at all by older versions of pexpect.