Lines Matching refs:command

151 def run(command, timeout=-1, withexitstatus=False, events=None,
155 This function runs the given command; waits for it to finish; then
157 path to the command is not given then the path is searched.
191 Run a command and capture exit status::
215 Whenever one of the patterns is seen in the command out run() will send the
229 child = spawn(command, maxread=2000, logfile=logfile, cwd=cwd, env=env)
231 child = spawn(command, timeout=timeout, maxread=2000, logfile=logfile,
282 def __init__(self, command, args=[], timeout=30, maxread=2000,
285 """This is the constructor. The command parameter may be a string that
286 includes a command and any arguments to the command. For example::
303 If you want to run a command and pipe it through another command then
310 in situations where you wish to spawn a command and pass it its own
330 very inefficient if you are running a command that generates a large
452 # Support subclasses that do not use command or args.
453 if command is None:
454 self.command = None
458 self._spawn(command, args)
486 s.append('command: ' + str(self.command))
512 def _spawn(self, command, args=[]):
514 """This starts the given command in a child process. This does all the
516 is empty then command will be parsed (split on spaces) and args will be
528 # If command is an int type then it may represent a file descriptor.
529 if isinstance(command, type(0)):
533 'file descriptor instead of a command string.')
539 self.args = split_command_line(command)
540 self.command = self.args[0]
544 self.args.insert(0, command)
545 self.command = command
547 command_with_path = which(self.command)
549 raise ExceptionPexpect('The command was not found or was not ' +
550 'executable: %s.' % self.command)
551 self.command = command_with_path
552 self.args[0] = self.command
557 assert self.command is not None, 'The command member must not be None.'
596 os.execv(self.command, self.args)
598 os.execvpe(self.command, self.args, self.env)
1890 """This splits a command line into a list of arguments. It splits arguments
1893 wrote a little state machine to parse the command line. """