I'm running a process with pyqt which produces a running output to /var/log/somefile.log. How can I pipe a realtime tail -f of somelogfile.log to a Qlistbox as the process is running, so far I have

Qt Code:
  1. f = os.system("tail -f /var/log/somefile.log")
  2. while 1:
  3. next = sys.stdin.readline(f)
  4. self.resultsbox.insertItem(f)
  5. if not next:
  6. break
To copy to clipboard, switch view to plain text mode 

but nothing is displayed in my Qlistbox, what are best practices, is there another way I should be doing this?