This object provides a file-like interface to a running process.
Members: pid what is the PID of the subprocess? killsig what signal
killed the child process? status what was the status of the command?
Methods: close Close this process, killing it if necessary. fileno
Return the fileno used to read from the process. wait Wait for the
process to finish. poll Is the process finished? elapsed How much time
has this process taken? read readline readlines
Method Summary |
|
__init__ (self,
pid,
cread,
errread)
Create a wrapper around a running process. |
|
__del__(self)
|
|
_cleanup_child (self)
Do necessary cleanup functions after child is finished running. |
|
_kill (self)
Kill the process and return killsig |
|
close (self)
Close the process, killing it if it is still running. |
|
elapsed (self)
Return the number of seconds elapsed since the process began. |
|
fileno (self)
Return the file descriptor used to read from the process. |
|
poll (self)
Return a boolean. |
|
read (self)
Return the output as a string. |
|
readline (self)
Return the next line or '' if finished. |
|
readlines (self)
Return the output of the process as a list of strings. |
|
wait (self)
Wait for the process to finish. |