Package ClusterShell :: Package Worker :: Module fastsubprocess
[hide private]
[frames] | no frames]

Module fastsubprocess

source code

_subprocess - Subprocesses with accessible I/O non-blocking file descriptors

Faster revision of subprocess-like module.

Classes [hide private]
  CalledProcessError
This exception is raised when a process run by check_call() returns a non-zero exit status.
  Popen
A faster Popen
Functions [hide private]
 
_cleanup() source code
 
call(*popenargs, **kwargs)
Run command with arguments.
source code
 
check_call(*popenargs, **kwargs)
Run command with arguments.
source code
 
set_nonblock_flag(fd)
Set non blocking flag to file descriptor fd
source code
Variables [hide private]
  MAXFD = 1024
  _active = []
  PIPE = -1
  STDOUT = -2
  __package__ = 'ClusterShell.Worker'
Function Details [hide private]

call(*popenargs, **kwargs)

source code 

Run command with arguments. Wait for command to complete, then return the returncode attribute.

The arguments are the same as for the Popen constructor. Example:

retcode = call(["ls", "-l"])

check_call(*popenargs, **kwargs)

source code 

Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute.

The arguments are the same as for the Popen constructor. Example:

check_call(["ls", "-l"])