looping over a big file

Terry Hancock hancock at anansispaceworks.com
Mon Jul 4 06:32:13 EDT 2005


On Sunday 03 July 2005 08:28 pm, Peter Hansen wrote:
> If open() can ever return things other than files, it seems likely it 
> will do so only under conditions that make it pretty much safe to assume 
> that existing code will continue to operate "as expected" (note: not 
> "always with a file").

WHEN it returns things other than files.  Like a StringIO object,
which can be quite handy.  True, it won't be a "big file", but it'd
be nice if the same code would tolerate it.  I've used this with
e.g. PIL quite a bit when working with Zope, because it isn't
really desireable to have to write the file out to disk and read
it back when you've already got it in memory.

Quack! ;-)
Terry
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com




More information about the Python-list mailing list