Never mind, I found it. Just for the record, if anyone else
needs this:

The class HTTPResponse (in ZPublisher/ has a
"write" method. When you're publishing to the web, the RESPONSE
object is an instance of this class.

    def write(self,data):
        Return data as a stream

        HTML data may be returned using a stream-oriented interface.
        This allows the browser to display partial results while
        computation of a response to proceed.

        The published object should first set any output headers or
        cookies on the response object.

        Note that published objects must not generate any errors
        after beginning stream-oriented output. 


I don't know if this is documented somewhere, but it does what
I wanted.

On Sun, Oct 29, 2000 at 11:05:25PM -0200, Lalo Martins wrote:
> Is it possible to "stream" (send data to the client via HTTP
> incrementally) from Python code, or does ZPublisher only send
> the data as a single wad when the method returns?
> Assuming it is possible, obviously it requires using some other
> API rather than just 'return'ing a string... where can I find
> documentation and/or examples on that? If there is no existing
> documentation or examples, source code would do.
> (Context: when the tests are running on ZUnit, I'd like to give
> some visual feedback, if possible by sending the dots returning
> by PyUnit in real-time)

          Hack and Roll  ( )
            News for, uh, whatever it is that we are.           mailto:[EMAIL PROTECTED]
         pgp key:

Brazil of Darkness (RPG)    ---

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to