Advertisement
Guest User

Untitled

a guest
Jan 15th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import subprocess
  2.  
  3. def main():
  4. with open("log.txt", "w") as logfile:
  5. f1(logfile)
  6. f2(logfile)
  7.  
  8. def f1(logfile):
  9. subprocess.Popen(["ls", "-l"], stdout = logfile)
  10.  
  11. def f2(logfile):
  12. subprocess.Popen(["ls", "-s"], stdout = logfile)
  13.  
  14. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement