[ZODB-Dev] how can I get the size of ZODB.Blob object ?

KLEIN Stéphane stephane at harobed.org
Tue Jul 7 09:11:34 EDT 2009


Hi,

I've take cognizance of ZODB.Blob. I think it's great tools.

Know, I've one question : how can I get the size (in octet) of Blob 
object ?

>>> f = myblob.open("r")
>>> size = len(f.read())
>>> print size

This code isn't efficient. What is the good method ?

Thanks for your help,
Stephane



More information about the ZODB-Dev mailing list