Package Bio :: Package MultiProc :: Module copen :: Class _ProcHandle
[hide private]
[frames] | no frames]

Class _ProcHandle

source code

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

Instance Methods [hide private]
 
__init__(self, pid, cread, errread=None)
Create a wrapper around a running process.
source code
 
__del__(self) 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
 
read(self)
Return the output as a string.
source code
 
wait(self)
Wait for the process to finish.
source code
 
poll(self)
Return a boolean.
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
Method Details [hide private]

__init__(self, pid, cread, errread=None)
(Constructor)

source code 

Create a wrapper around a running process. pid is the process ID. cread is the file object used to read from the child. errread is an optional file object used to read errors from the child.

poll(self)

source code 

Return a boolean. Is the process finished running?