Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess
- def runGetOutput(cmdAndArgs):
- pipe = subprocess.Popen(cmdAndArgs, stdout=subprocess.PIPE, shell=True);
- text = pipe.communicate()[0]
- #print cmdAndArgs
- return text
- # pipe is destroyed upon scope exit??
Add Comment
Please, Sign In to add comment