Readline and record separator
clbr
kalbrun.pawel at gmail.com
Tue Oct 30 08:47:01 EDT 2007
On Oct 30, 12:21 pm, Johny <pyt... 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?
> Thank you
> L.
I'm not aware any such a method. But what you could do is simply read
all of them(readlines()) and then split it(delimeter would be your new
line)
More information about the Python-list
mailing list