Readline is not SUPPOSED to finish! Here is what the manual says about tail -f regarding this: the tail command does not terminate after the last specified unit of the input file has been copied, but continues to read and copy additional units from the input file as they become available. The idea is that it NEVER terminates, but shows you basically everything from the point specified on. Another portion of the man page is clearer: 4. To follow the growth of a file, enter: tail -f accounts This displays the last 10 lines of the accounts file. The tail command continues to display lines as they are added to the accounts file. The display continues until you press the Ctrl-C key sequence to stop it. Steve -- Original Message -- >All, > >I have a script that uses popen to start an external process (tail -f) and >allow me to read the results: > >1: stdin=os.popen('tail -f somefile') >2: logline=re.compile('(.*?).*?- - \[(.*?)\] "(.*?) (.*?)" (.*?) (.*?) >"(.*?)" "(.*?)".*') >3: a=stdin.readline() >4: print a >5: while a: >6: g=logline.search(a) >7: if not g: continue > >The problem is that it gets to line 3 and sits waiting for the readline to >finish, which as far as I can see it never does. > >Any ideas. > >Phil > > > > >_______________________________________________ >ActivePython mailing list >[EMAIL PROTECTED] >http://listserv.ActiveState.com/mailman/listinfo/activepython > _______________________________________________ ActivePython mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/activepython