[Tutor] How long can a line be for readline() or readlines() ??

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Thu, 8 Nov 2001 17:51:50 -0800 (PST)


On Thu, 8 Nov 2001, Schmidt, Allen J. wrote:

> Is there a limit to the length of an individual line when using
> readlines() or readline() ?
> 
> I get errors when a line exceeds 2048 characters.

Hmm!  There should be no hard limit to how long a line should be!  That's
one of the reasons why Python is good for text manipulation: it can handle
these files without any handholding from us.

Can you show us the error message, as well as a sample file that triggers
the error?  Thanks!