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

Module copen

source code

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 [hide private]
  _ProcHandle
This object provides a file-like interface to a running process.
  _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?
Functions [hide private]
file-like object
copen_sys(syscmd, *args)
Open a file-like object that returns the output from a system command.
source code
file-like object
copen_fn(func, *args, **keywords)
Open a file-like object that returns the output from function call.
source code
 
_handle_sigterm(signum, stackframe)
Handles a SIGTERM.
source code
 
_cleanup()
Close all active commands.
source code
Variables [hide private]
  _active = []
  _HANDLING = 0
  _PREV_SIGTERM = 0
  __warningregistry__ = {('Bio.MultiProc is deprecated. If you w...
Function Details [hide private]

copen_fn(func, *args, **keywords)

source code 

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.

Returns: file-like object

_handle_sigterm(signum, stackframe)

source code 

Handles a SIGTERM. Cleans up.


Variables Details [hide private]

__warningregistry__

Value:
{('Bio.MultiProc is deprecated. If you want to use this code, please l\
et the Biopython developers know by sending an email to biopython-dev@\
biopython.org to avoid permanent removal of Bio.MultiProc.',
  <type 'exceptions.DeprecationWarning'>,
  14): 1}