file reading by record separator (not line by line)

Lee Sander lesande at gmail.com
Thu May 31 08:26:14 EDT 2007


Dear all,
I would like to read a really huge file that looks like this:

> name1....
line_11
line_12
line_13
...
>name2 ...
line_21
line_22
...
etc

where line_ij is just a free form text on that line.

how can i read file so that every time i do a "read()" i get exactly
one record
up to the next ">"

many thanks
Lee




More information about the Python-list mailing list