[ZODB-Dev] how can I get the size of ZODB.Blob object ?
Christian Theune
ct at gocept.com
Tue Jul 7 10:54:07 EDT 2009
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
Christian
--
Christian Theune · ct at gocept.com
gocept gmbh& co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
More information about the ZODB-Dev
mailing list