[Zope-dev] Writing results directly back to browser

David S. Harrison dsh@magma-da.com
Wed, 10 Nov 1999 17:44:53 -0800


I have an external method that is capable of generating a PNG image
in response to some input data.  I would like to use this in the
context of Zope to display a computed image on the fly.  I am looking
for suggestions on a couple of fronts: how can I wire this infrastructure
into DTML and how does one write directly back to the browser from
an external method?

Here are my first guesses on both fronts.  For DTML, my thinking
is along the following lines:

  <IMG SRC="GenerateGraphics">

Here, I imagine that "GenerateGraphics" is an external method.
I read somewhere (although I can't recall where), that an
external method can take RESPONSE as an argument.  So, on
the second front, I am imagining that the external method
uses RESPONSE to set the content type and then writes 
the results using the RESPONSE.write() method.  Am I on
the right track here?

			David S. Harrison
			(dsh@magma-da.com)