Advertisement
metalx1000

Python run system command and save output to variable

Nov 26th, 2017
911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.07 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. import os
  3. tmp = os.popen("ls").read()
  4. print(tmp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement