-added popen3
authorTony Mack <tmack@cs.princeton.edu>
Wed, 26 Mar 2008 00:31:34 +0000 (00:31 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Wed, 26 Mar 2008 00:31:34 +0000 (00:31 +0000)
qaapi/qa/utils.py

index 2ff395e..0e5a5a6 100644 (file)
@@ -23,6 +23,11 @@ def popen(command, fatal=True):
     if fatal and errors:
        raise Exception, "".join(errors)        
     return (output, errors)    
+
+def popen3(command):
+    (stdin, stdout, stderr) = os.popen3(command)
+    print >> logfile, "+ "+command
+    return (stdin, stdout, stderr)                     
     
 def commands(command, fatal = True):
     (status, output) = getstatusoutput(command)