ECTED]]On Behalf Of Phil
> Harris
> Sent: 06 July 2001 09:32
> To: [EMAIL PROTECTED]; Arthur Lee
> Subject: Re: popen usage
>
>
> Arthur,
>
> If you mean to add the second readline then the script already has that, I'd
> shortened the script for clarity.
>
.
Phil
- Original Message -
From: Arthur Lee
To: Phil Harris ; [EMAIL PROTECTED]
Sent: Friday, July 06, 2001 7:29 AM
Subject: Re: popen usage
Perhaps it should have been the following? :
1: stdin=os.popen('tail -f somefile')
2: logline=re.compile('(.*?).*?- - \[(.*?
s anyway.
Phil
- Original Message -
From: Arthur Lee
To: Phil Harris ; [EMAIL PROTECTED]
Sent: Friday, July 06, 2001 7:29 AM
Subject: Re: popen usage
Perhaps it should have been the following? :
1:stdin=os.popen('tail -f somefile')
Perhaps it should have been the following? :
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
8:
>
To: "Phil Harris" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 5:57 PM
Subject: RE: popen usage
> Readline is not SUPPOSED to finish! Here is what the manual says about
> tail -f regarding this:
>
> the tail command does not term
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.
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