mrv.batch

Epydoc: mrv.batch

This modules contains utilities to do opeations in batch mode. The module can be used from within python if required, but is more commonly used from the commandline, possibly wrapped by a shell script to specialize its usae

Functions

mrv.batch._popleftchecked(argv, errmsg)
pop an arg from argv and return with an error message on error
mrv.batch._toStream(arg, stream)
Returns:stream according to arg
Parameter:stream – stream to return if arg sais so
mrv.batch._usageAndExit(msg=None)
Print usage
mrv.batch.killProcess(process)
Kill the given process :note: raises if kill is not supported by the os module
mrv.batch.main(*args)
Processes the arguments
mrv.batch.process(cmd, args, inputList, errorstream=None, donestream=None, inputsPerProcess=1, numJobs=1)
Launch process at cmd with args and a list of input objects from inputList appended to args :param cmd: full path to tool you wish to start, like /bin/bash :param args: List of all argument strings to be passed to cmd :param inputList: list of input files to be passed as input to cmd :param errorstream: stream to which errors will be written to as they occour if not None :param donestream: stream to which items from input list will be passed once they have been processed if not None. Items are newline terminated :param inputsPerProcess: pass the given number of inputs to the cmd, or less if there are not enough items on the input list :param numJobs: number of processes we may run in parallel
mrv.batch.superviseJobs(jobs, returnIfLessThan, cmdinput, errorstream, donestream)
Check on the jobs we have and wait for finished ones. Write information about them into the respective streams :param returnIfLessThan: return once we have less than the given amount of running jobs

Classes

Epydoc: mrv.batch

class mrv.batch.deque

Bases: object

deque(iterable[, maxlen]) –> deque object

Build an ordered collection accessible from endpoints only.

append
Add an element to the right side of the deque.
appendleft
Add an element to the left side of the deque.
clear
Remove all elements from the deque.
extend
Extend the right side of the deque with elements from the iterable
extendleft
Extend the left side of the deque with elements from the iterable
pop
Remove and return the rightmost element.
popleft
Remove and return the leftmost element.
remove
D.remove(value) – remove first occurrence of value.
rotate
Rotate the deque n steps to the right (default n=1). If n is negative, rotates left.

Table Of Contents

Previous topic

mrv.dgfe

Next topic

mrv.path

This Page