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

Reply via email to