Guest User

Untitled

a guest
Dec 15th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import subprocess
  2.  
  3. def runGetOutput(cmdAndArgs):
  4. pipe = subprocess.Popen(cmdAndArgs, stdout=subprocess.PIPE, shell=True);
  5. text = pipe.communicate()[0]
  6.  
  7. #print cmdAndArgs
  8.  
  9. return text
  10.  
  11. # pipe is destroyed upon scope exit??
Add Comment
Please, Sign In to add comment