Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. import subprocess
  2.  
  3. def get_command_output(command):
  4. process = subprocess.Popen(
  5. args=command,
  6. stdout=subprocess.PIPE,
  7. shell=True
  8. )
  9. return process.communicate()[0].decode()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement