in reply to Re^4: Check for a new line
in thread Check for a new line

I'd have to sit and think about it more than I have time to, but threads or one of its cousins may be useful in this instance. Have the program run in a separate thread, dumping data to somewhere you can grab it, and tail that file every 10 seconds.