Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess
- def get_command_output(command):
- process = subprocess.Popen(
- args=command,
- stdout=subprocess.PIPE,
- shell=True
- )
- return process.communicate()[0].decode()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement