Sets provided parameters for the subprocess call context.
Applicable for the initial call of self.__init__(),
and later modification. Called for each start of
a subprocess in order to update optional the specific
call context modification.
Args:
**kargs: Parameter specific for the operation,
bufsize:
The size of the output buffer for the called
subprocess, refer to **subprocess.Popen**.
Default value is -1.
console ('cli','dialogue')
ffs ('batch','ui','gtk', 'qt')
cli:
Works in batch mode, particularly the
stdin, stdout, and stderr streams are
caught into a string buffer by the
calling process via a pipe. The content
is passed after termination of the
called sub-process.
dialogue:
Works without buffered io streams.
Thus allows for interaction, but not
post-processing.
verbose:
Verbose.
debug:
Sets debug for rule data flow.
emptyiserr:
Treats passed empty call strings as error.
The applied 'subprocess.Popen()' treats them as
success, which may cover errors in generated
call strings, particularly in loops.
default := False
env:
Environment to be passed through to the subprocess.
Default := current
errasexcept:
Passes errors as exceptions, transforms the resuls from
subprocesses into Exceptions data. Exits the process.
default := False
exectype:
Type of execution.
* inproc:
Calls 'Popen' directly from within the process.
* bythread:
Starts an intermediate thread within current
process and executes 'Popen'.
* byfork
Starts an intermediate process by fork and
executes 'Popen'.
forcecmdcall:
Forces type of the command call option passed to 'Popen'.
* shell
* list
out: Output for display. Supported types are:
csv:
CSV seperated by ';', with sparse records
pass:
Pass through STDOUT and STDERR from
subprocess
repr:
Python 'repr()'
str:
Python 'str()'
xml:
XML
passerr:
Passes errors from subprocesses transparently
through by stdout, stderr, and exit code. Exits
the process.
default := False
proceed ('print','trace', 'doit')
print - trace only
trace - execute and trace
doit - execute
raw:
Pass through STDOUT and STDERR.
rules:
Sets the rules object.
synctype:
Type of call synchronization.
* async:
Executes the subprocess asynchronously, this e.g. enables
in current implementation for platform independent timeouts.
* sync:
Executes synchronously, thus blocks any other execution.
tsig:
Termination signal, default is KILL.
tmax:
Timeout in seconds.
useexit:
Use exit code for error detection of subprocess.
default := True
usestderr:
Use 'sys.stderr' output for error detection of subprocess.
When set to 'True', the presence of a string is treated as error
condition.
default := False
verbose:
Sets verbose for rule data flow.
Returns:
When successful returns 'True', else returns either 'False', or
raises an exception.
Success is the complete addition only, thus one failure returns
False.
Raises:
passed through exceptions:
|