[Zope] PythonScripts and REQUEST, RESPONSE objects

Wolfgang Strobl ws@gmd.de
Thu, 8 Mar 2001 11:48:52 +0100


On 8 Mar 2001, 9:26  Chris Withers wrote:

> > after line 124 in Pythonscript.py. Now each time I add a new
> > PythonScript object, it starts with
> > 
> > from Products.PythonScripts.standard import html_quote
> > REQUEST = context.REQUEST
> > RESPONSE = context.REQUEST.RESPONSE
> 
> Can you stick that in the Collector as a 'Feature w/patch'?

Done. In addition as an afterhought,  I suggested adding two 
additional lines

print "This is Script (Python) ",script.getId(),"("+script.title+") at 
",container.absolute_url()
return printed

in analogy to the default content of DTML Methods.

Btw, what's the correct way of rendering the default 
standard_html_header/footer from within a Python script? 

--
      o      (     Wolfgang.Strobl@gmd.de (+49 2241) 14-2394
     /\        *   GMD mbH                       #include 
   _`\ `_<===      Schloss Birlinghoven,         <std.disclaimer>
__(_)/_(_)___.-._  53754 Sankt Augustin, Germany ________________