Package gmisclib :: Module do_exec
[frames] | no frames]

Module do_exec

source code

Execute a *nix command and capture the output.


Version: $Revision: 1.5 $

Functions
 
getall(s)
Read a list of lines from a process, after dropping junk like comments (beginning with whitespace then '#') or blank lines.
source code
 
get(s)
Read a single line from a process, after dropping junk like comments (#) or blank lines.
source code
Variables
  __package__ = 'gmisclib'

Imports: os, re


Function Details

getall(s)

source code 

Read a list of lines from a process, after dropping junk like comments (beginning with whitespace then '#') or blank lines. Raises an exception if if the process returns a line beginning with 'ERR:' The argument s is a string containing the command and its arguments. S is normally passed to a shell.

get(s)

source code 

Read a single line from a process, after dropping junk like comments (#) or blank lines. Returns a trouble indication if the process returns 'ERR:'