[Zope] trailing whitespace optimization

Gregory Haley ghaley@venaca.com
Tue, 11 Jul 2000 09:42:05 -0400


Hi Paul,

You're right about the size of files with trailing blanks. 
I had a file of over 1 meg yesterday, and when I striped all
the blanks it was only 47K, pretty radical reduction.

There is an external Python method that is part of the zope
Extenions library, it should be in something called
/opt/zope/Extensions/ called strip_blanks.py.  You can
attach it to your zope session, then it is called via:

   <dtml-var "strip_blank(varName)[:-1]">

This will at least strip all the trailing blanks from an
individual variable.

ciao!
greg.

Gregory Haley
venaca.com

Paul Abrams wrote:
> 
> I'm noticing that our file sizes could be reduced by 10% or
> more by trimming trailing whitespace. Is there a way to get
> Zope to do that automatically? It would be best if Zope did
> it whenever a method was saved.
> 
> Thanks in advance,
> -Paul
> 
> __________________________________________________
> Do You Yahoo!?
> Get Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
> 
> _______________________________________________
> 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 )