[Zope] How i get size of object?

Andy McKay andy@agmweb.ca
Tue, 25 Jun 2002 07:54:06 -0700


This wondrous bit of dtml is pulled from the ZMI:

  <dtml-try>
  <dtml-if get_size>
  <dtml-let ob_size=get_size>
  <dtml-if "ob_size < 1024">
  1 Kb
  <dtml-elif "ob_size > 1048576">
  <dtml-var "ob_size / 1048576.0" fmt="%0.02f"> Mb
  <dtml-else>
  <dtml-var "_.int(ob_size / 1024)"> Kb
  </dtml-if>
  </dtml-let>
  <dtml-else>
  &nbsp;
  </dtml-if>
  <dtml-except>
  &nbsp;
  </dtml-try>

----- Original Message ----- 
From: "Daniel Schmitz" <dpsgd@yahoo.com.br>
To: <zope@zope.org>
Sent: Tuesday, June 25, 2002 6:52 AM
Subject: [Zope] How i get size of object?


> Hi all,
> 
> how i get size of object using dtml?
> 
> _______________________________________________________________________
> Copa 2002
> Yahoo! - Patrocinador oficial da Copa do Mundo da FIFA 2002
> http://br.sports.yahoo.com/fifaworldcup/
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>