Advertisement
Guest User

Untitled

a guest
Nov 1st, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. from subprocess import Popen, STDOUT, PIPE
  2. from time import sleep
  3.  
  4. x = Popen('iosnoop -A -f ' + FileName, shell=True, stderr=STDOUT, stdout=PIPE, stdin=PIPE)
  5. while x.poll() == None:
  6.     output = x.stdout.readline()
  7.     print(output)
  8.     sleep(0.5)
  9.  
  10. print('IOsnoop has ended for some reason:')
  11. print(x.stdout.read())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement