Trees | Index | Help |
---|
Package Bio :: Package MultiProc :: Module copen |
|
This implements a set of classes that wraps a file object interface around code that executes in another process. This allows you fork many different commands and let the run concurrently.
Functions: copen_sys Open a file-like pipe to a system command. copen_fn Open a file-like pipe to a python function.Classes | |
---|---|
_PickleHandle |
Members: pid what is the PID of the subprocess? killsig what signal killed the child process? status what was the status of the command? |
_ProcHandle |
This object provides a file-like interface to a running process. |
Function Summary | |
---|---|
copen_fn(func, *args, **keywords) -> file-like object | |
copen_sys(syscmd, *args) -> file-like object | |
Close all active commands. | |
Handles a SIGTERM. |
Variable Summary | |
---|---|
int |
_HANDLING = 0 |
int |
_PREV_SIGTERM = 0 |
Function Details |
---|
copen_fn(func, *args, **keywords)copen_fn(func, *args, **keywords) -> file-like object Open a file-like object that returns the output from function call. The object's 'read' method returns the return value from the function. The function is executed as a separate process so any variables modified by the function does not affect the ones in the parent process. The return value of the function must be pickle-able. |
copen_sys(syscmd, *args)copen_sys(syscmd, *args) -> file-like object Open a file-like object that returns the output from a system command. |
_cleanup()Close all active commands. |
_handle_sigterm(signum, stackframe)Handles a SIGTERM. Cleans up. |
Variable Details |
---|
_HANDLING
|
_PREV_SIGTERM
|
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Thu Aug 10 20:01:08 2006 | http://epydoc.sf.net |