Lines Matching refs:command

13 spawn. You can call the run() function to execute a command and return the
21 external child command and then interact with the child by sending lines and
145 def run (command, timeout=-1, withexitstatus=False, events=None, extra_args=None, logfile=None, cwd=None, env=None):
148 This function runs the given command; waits for it to finish; then
150 path to the command is not given then the path is searched.
184 Run a command and capture exit status::
206 Whenever one of the patterns is seen in the command out run() will send the
220 child = spawn(command, maxread=2000, logfile=logfile, cwd=cwd, env=env)
222 child = spawn(command, timeout=timeout, maxread=2000, logfile=logfile, cwd=cwd, env=env)
268 def __init__(self, command, args=[], timeout=30, maxread=2000, searchwindowsize=None, logfile=None, cwd=None, env=None):
270 """This is the constructor. The command parameter may be a string that
271 includes a command and any arguments to the command. For example::
288 If you want to run a command and pipe it through another command then
295 in situations where you wish to spawn a command and pass it its own
315 very inefficient if you are running a command that generates a large
424 # allow dummy instances for subclasses that may not use command or args.
425 if command is None:
426 self.command = None
430 self._spawn (command, args)
458 s.append('command: ' + str(self.command))
484 def _spawn(self,command,args=[]):
486 """This starts the given command in a child process. This does all the
488 is empty then command will be parsed (split on spaces) and args will be
500 # If command is an int type then it may represent a file descriptor.
501 if type(command) == type(0):
502 raise ExceptionPexpect ('Command is an int type. If this is a file descriptor then maybe you want to use fdpexpect.fdspawn which takes an existing file descriptor instead of a command string.')
508 self.args = split_command_line(command)
509 self.command = self.args[0]
512 self.args.insert (0, command)
513 self.command = command
515 command_with_path = which(self.command)
517 raise ExceptionPexpect ('The command was not found or was not executable: %s.' % self.command)
518 self.command = command_with_path
519 self.args[0] = self.command
524 assert self.command is not None, 'The command member should not be None.'
560 os.execv(self.command, self.args)
562 os.execvpe(self.command, self.args, self.env)
1797 """This splits a command line into a list of arguments. It splits arguments
1800 wrote a little state machine to parse the command line. """