Tools for running external processes.
Functions
| StringIO | StringIO([s]) – Return a StringIO-like stream for reading or writing |
Classes
| BaseOutputHandler([loggername]) | Base class for output handlers |
| BaseToolController([loggername]) | Base class for controlling command line tools |
| GenericToolDescriptor(executable[, cwd, ...]) | Generic tool descriptor |
| ToolDescriptor(executable[, cwd, env, ...]) | Command line tool desctiptor |
Base class for output handlers
Feed some data to the parser
It is processed insofar as it consists of complete elements; incomplete data is buffered until more data is fed or close() is called.
Handle output lines
This method is not meant to be directly called by the user.
The user, anyway, can provide a custom implementation in derived classes.
| Parameters : |
|---|
Handle progress data.
This method is not meant to be called by the user.
The user, anyway, can provide a custom implementation in derived classes.
| Parameters : |
|---|
Reset the handler instance
Loses all unprocessed data. This is called implicitly at instantiation time.
Command line tool desctiptor
| Attributes : |
|---|
program name if it is in the system search path
cwd: program working directory
according to isextraenv
isextraenv: True if env items must be added to os environment
stdout_handler: the OutputHandler for the stdout of the tool
stderr_handler: the OutputHandler for the stderr of the tool
Generate the complete command-line for the tool
This method is meant to be used together with “subprocess” so the “comman-line” actually is a list of strings.
If you need a command-line in single string form use something like:
str(tooldescriptorinstance)
or:
' '.join(tooldescriptorinstance.cmdline(arg1, arg2, arg3))
Generic tool descriptor
The command line can be entirely defined by means of arguments passed to the cmdline method.
Generate the complete command-line for the tool
This method is meant to be used together with “subprocess” so the “comman-line” actually is a list of strings.
If the executable attribute is not set (evaluate false) then the first non-keyword argument is considered to be the executable tool name.
The command line is build as follows:
executable keyword-arguments args
If you need a command-line in single string form use something like:
' '.join(tooldescriptorinstance.cmdline(arg1, arg2, arg3))