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
|
__init__(self,
pid,
cread,
errread=None)
Create a wrapper around a running process. |
source code
|
|
|
|
|
_kill(self)
Kill the process and return killsig |
source code
|
|
|
close(self)
Close the process, killing it if it is still running. |
source code
|
|
|
fileno(self)
Return the file descriptor used to read from the process. |
source code
|
|
|
readline(self)
Return the next line or '' if finished. |
source code
|
|
|
readlines(self)
Return the output of the process as a list of strings. |
source code
|
|
|
|
|
|
|
|
|
elapsed(self)
Return the number of seconds elapsed since the process began. |
source code
|
|
|
_cleanup_child(self)
Do necessary cleanup functions after child is finished running. |
source code
|
|