rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions | Variables
etr.tools.subprocess Namespace Reference

Classes

class  SignalContextManager
 Provides a context manager to be able to captue signals and forward them to a subprocess within a context manager scope. More...
 
class  KillOrphansContextManager
 Use instead of popen to perform cleanup of orphan subprocesses. More...
 

Functions

def cmd_and_log
 Runs command and logs to line_handler. More...
 

Variables

string TEMPLATE
 

Function Documentation

def etr.tools.subprocess.cmd_and_log (   command)

Runs command and logs to line_handler.

It can also generate a script file that re-creates the execution environment which can be useful for debugging outside etr.

Parameters
commandCommand to execute.
kill_orphansWhether to kill orphaned processes or not. Default is True.
line_handlerCallback invoked for each line of output of command
script_fileWhether or not to generate a script file that reproduce the command invocation.
Returns
None

Variable Documentation

string etr.tools.subprocess.TEMPLATE