[Zope-DB] DCOracle2: Repeatedly writing to a CLOB as easy as ...?

John Ziniti jziniti@speakeasy.org
Wed, 09 Apr 2003 15:35:28 -0500

I have a large file (~150 MB) that I would like to write to a CLOB, but
I would prefer not to:

data = file.read()

I see a bit about the clob.write() method in the source. Is doing what I
want as easy as:

offset = 0
for line in file.xreadlines():
    clob.write(line, offset)
    offset += len(line)



John Ziniti