Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Functions | |
def | getstatus |
def | getoutput |
def | getstatusoutput |
def | mk2arg |
def | mkarg |
Variables | |
list | __all__ = ["getstatusoutput","getoutput","getstatus"] |
Execute shell commands via os.popen() and return status, output. Interface summary: import commands outtext = commands.getoutput(cmd) (exitstatus, outtext) = commands.getstatusoutput(cmd) outtext = commands.getstatus(file) # returns output of "ls -ld file" A trailing newline is removed from the output string. Encapsulates the basic operation: pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r') text = pipe.read() sts = pipe.close() [Note: it would be nice to add functions to interpret the exit status.]
def commands.getoutput | ( | cmd) |
Return output (stdout or stderr) of executing cmd in a shell.
Definition at line 42 of file commands.py.
def commands.getstatus | ( | file) |
def commands.getstatusoutput | ( | cmd) |
def commands.mk2arg | ( | head, | |
x | |||
) |
def commands.mkarg | ( | x) |
Definition at line 75 of file commands.py.
Definition at line 22 of file commands.py.