[Zope-dev] RFE: Make PythonScripts.standard available from DTML _.standard

Steve Alexander steve@cat-box.net
Fri, 05 Jan 2001 13:38:45 +0000


This is an RFE for Zope 2.3.

I'm posting it here for discussion, rather than in the Collector.


In the new PythonScripts product (that is a standard part of Zope 2.3) 
there is a standard utility module that can be imported into a Python 
Script with

   import Products.PythonScripts.standard

or

   from Products.PythonScripts.standard import *

It contains useful functions such as those for text formatting 
(html_quote, url_quote_plus, and so on). It also contains the DTML class 
for creating temporary chunks of restricted DTML.

These functions would be really useful as part of the DTML _ namespace 
variable. I sometimes find myself wanting to use html_quote in a DTML 
expression. I'd also be able to use these functions from ZPatterns 
SkinScript.

The PythonScripts product could add these functions to the _ namespace 
variable at product init time, so there would be no need to change the 
DocumentTemplate modules.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net