On Sun, May 13, 2007 at 03:04:36PM -0700, Alan wrote:
> I'm looking for a more elegant way to parse sections of text files that
> are bordered by BEGIN/END delimiting phrases, like this:
>
> some text
> some more text
> BEGIN_INTERESTING_BIT
> someline1
> someline2
> someline3
> END_INTERESTING_B
"Alan" <[EMAIL PROTECTED]> wrote
> I'm looking for a more elegant way to parse sections of text files
> that
> are bordered by BEGIN/END delimiting phrases, like this:
>
> some text
> BEGIN_INTERESTING_BIT
> someline1
> someline3
> END_INTERESTING_BIT
> more text
>
> What I have been doing is cl
On 14/05/07, Alan <[EMAIL PROTECTED]> wrote:
> I'm looking for a more elegant way to parse sections of text files that
> are bordered by BEGIN/END delimiting phrases, like this:
>
> some text
> some more text
> BEGIN_INTERESTING_BIT
> someline1
> someline2
> someline3
> END_INTERESTING_BIT
> more t
I'm looking for a more elegant way to parse sections of text files that
are bordered by BEGIN/END delimiting phrases, like this:
some text
some more text
BEGIN_INTERESTING_BIT
someline1
someline2
someline3
END_INTERESTING_BIT
more text
more text
What I have been doing is clumsy, involving conver
Alan Gauld wrote:
>> 1.) when i do readlines and create a list and then print the list it
>> adds a blank line between every line of text
>
> I suspect that's because you are reading a newline character
> from the file and print adds a newline of its own. You need to
> use rstrip() to take out th
"Jay Mutter III" <[EMAIL PROTECTED]> wrote
> i have the following text:
>
> Barnett, John B., assignor of one-half to R. N. Tutt, Kansas City,
> Mo.Automatic display-sign.No. 1,330 411-Apr. 13 ; v. 273 ;
> p.
> 193.
> Barnett, John II.. Tettenhall, England. Seat of
> motorcars.
Kent thanks for this as I was clearly confused with regards to string
and list of strings.
I am, however, still having difficulty with how to solve a problem
involving a related issue.
i have the following text:
Barnett, John B., assignor of one-half to R. N. Tutt, Kansas City,
Mo.Auto
"Jay Mutter III" <[EMAIL PROTECTED]> wrote
> 1.) Are there better ways to write this?
There are always other ways, as to which is better depends
on your judgement criteria. Your way works.
> 2.) As it writes out the one group to the new file for companies it
> is as if it leaves blank lines behi
Script i have to date is below and
Thanks to your help i can see some daylight but I still have a few
questions
1.) Are there better ways to write this?
2.) As it writes out the one group to the new file for companies it
is as if it leaves blank lines behind for if I don't have the elif len