In message <[EMAIL PROTECTED]>, Sean Davis
wrote:

> I have a VERY large file that I would
> like to load a line at a time, do some manipulations on it, and then
> make it available to as a file-like object for use as input to a
> database module (psycopg2) that wants a file-like object (with read
> and readlines methods).  I could write the manipulated file out to
> disk and then read it back in, but that seems wasteful.

If your consumer doesn't need to seek, how about having it read from a pipe?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to