Readline and record separator
A.T.Hofkamp
hat at se-162.se.wtb.tue.nl
Tue Oct 30 08:45:12 EDT 2007
More information about the Python-list mailing list
Tue Oct 30 08:45:12 EDT 2007
- Previous message (by thread): redundancy_check
- Next message (by thread): Readline and record separator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2007-10-30, Johny <python at hope.cz> wrote: > Is it possible to change record separator when using readline? > As far as I know readline reads characters until found '\n' and it is > the end of record for readline. > My problem is that my record consits several '\n' and when I use > readline it does NOT read the whole my record. > So If I could change '\n' as a record separator for readline, it > would solve my problem. > Any idea? Read large enough blocks of data, then use block.find() (in the string module) to find your delimiter, and split the block. Albert
- Previous message (by thread): redundancy_check
- Next message (by thread): Readline and record separator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list