Package TEES :: Package Tools :: Module ProcessUtils :: Class ProcessWrapper
[hide private]

Class ProcessWrapper

source code

Killing a process spawned by a shell is not really possible (at least in Python). This becomes a problem, if a tool requires multiple (e.g. piped) processes to be ran. With ProcessWrapper, all processes can be called directly from Python so that their ids are known and they can be killed if they hang. A ProcessWrapper can be passed as a parameter to ProcessUtils functions in place of a subprocess.Popen object.

Instance Methods [hide private]
 
__init__(self, processes) source code
 
kill(self)
Kill all subprocesses
source code
 
poll(self)
If any subprocess is running, returns None (not finished).
source code