diff options
Diffstat (limited to 'Lib/commands.py')
-rw-r--r-- | Lib/commands.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/commands.py b/Lib/commands.py index 99387b1..a21460d 100644 --- a/Lib/commands.py +++ b/Lib/commands.py @@ -1,9 +1,9 @@ """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" @@ -11,7 +11,7 @@ Interface summary: 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() |