Package shelljob :: Module proc
[hide private]
[frames] | no frames]

Module proc

source code

A mechanism to run subprocesses asynchronously and with non-blocking read.

Classes [hide private]
  WrapException
  CommandException
  Group
Runs a subprocess in parallel, capturing it's output and providing non-blocking reads (well, at least for the caller they appear non-blocking).
  BadExitCode
  Timeout
Functions [hide private]
 
call(cmd, encoding='utf-8', shell=False, check_exit_code=True, timeout=None)
Calls a subprocess and returns the output and optionally exit code.
source code
 
_expand_cmd(cmd) source code
Variables [hide private]
  __package__ = 'shelljob'
Function Details [hide private]

call(cmd, encoding='utf-8', shell=False, check_exit_code=True, timeout=None)

source code 

Calls a subprocess and returns the output and optionally exit code.

Parameters:
  • encoding - convert output to unicode objects with this encoding, set to None to get the raw output
  • check_exit_code - set to False to ignore the exit code, otherwise any non-zero result will throw BadExitCode.
  • timeout - If specified only this amount of time (seconds) will be waited for the subprocess to return
Returns:
If check_exit_code is False: list( output, exit_code ), else just the output