grabbing portions of a file to output files

s99999999s2003 at yahoo.com s99999999s2003 at yahoo.com
Mon May 22 13:28:16 CEST 2006


hi.
I have a file with this kind of structure:

Hxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.........
.....
.....
xxxxx
Hxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
...
....
...
xxxxx
Hxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.....
....
and so on....lines starting with 'H' are headers. I wish to get the
parts of the file
where line start with 'H' all the way till before the next 'H' and save
to files of different names...how is the best way to do it ?
thanks




More information about the Python-list mailing list