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
f = os.system("tail -f /var/log/somefile.log")
while 1:
next = sys.stdin.readline(f)
self.resultsbox.insertItem(f)
if not next:
break
f = os.system("tail -f /var/log/somefile.log")
while 1:
next = sys.stdin.readline(f)
self.resultsbox.insertItem(f)
if not next:
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?
Bookmarks