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

Klein Stéphane stephane at harobed.org
Tue Jul 7 14:47:01 EDT 2009


Le Tue, 07 Jul 2009 16:54:07 +0200, Christian Theune a écrit :

> On 07/07/2009 04:47 PM, Andreas Jung wrote:
>> How about seek()ing to the end of the blob and then using tell() for
>> getting the position?
>>    
> Yup.
> 
> An opened blob is just a regular file handle. So the same applies as to
> normal files:
> 
>  >>> f = open('asdf')
>  >>> t.seek(0, 2)
>  >>> t.tell()
> 35L

Thanks.
Regards,
Stephane



More information about the ZODB-Dev mailing list