Hi to all,
thanks for your help. The approach
print '\r\n'.join([x.strip() for x in
open('c:/flutest.txt') if 'e-0' in x])
works quite well :-)
Greetings!
Fabian
Fabian Braennstroem schrieb am 09/13/2007 09:09 PM:
> Hi,
>
> I would like to delete a region on a log file which has this
>
On Sep 13, 4:09 pm, Fabian Braennstroem <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to delete a region on a log file which has this
> kind of structure:
>
How about just searching for what you want. Here are two approaches,
one using pyparsing, one using the batteries-included re module.
-
Fabian Braennstroem wrote:
> I would like to delete a region on a log file which has this
> kind of structure:
>
>
> #--flutest
>498 1.0086e-03 2.4608e-04 9.8589e-05 1.4908e-04
> 8.3956e-04 3.8560e-03 4.8384e-02 11:40:01 499
>
On 13/09/2007, Fabian Braennstroem <[EMAIL PROTECTED]> wrote:
> me again... I should describe it better:
> the result should be an array with just:
>
> 498 1.0086e-03 2.4608e-04 9.8589e-05 1.4908e-04 8.3956e-04
> 3.8560e-03 4.8384e-02 11:40:01 499
> 499 1.0086e-03 2.4608e-04 9.8589e-05 1.4908e-04
me again... I should describe it better:
the result should be an array with just:
498 1.0086e-03 2.4608e-04 9.8589e-05 1.4908e-04 8.3956e-04
3.8560e-03 4.8384e-02 11:40:01 499
499 1.0086e-03 2.4608e-04 9.8589e-05 1.4908e-04 8.3956e-04
3.8560e-03 4.8384e-02 11:40:01 499
500 1.0049e-03 2.4630e-04