[Twisted-Python] Process Producer, Request Consumer

Glyph Lefkowitz glyph at twistedmatrix.com
Sun Nov 18 04:17:26 EST 2001


On Sun, 2001-11-18 at 01:32, Chris Armstrong wrote:
> From: Kevin Turner <acapnotic at twistedmatrix.com>
> Subject: Re: [Twisted-Python] Process Producer, Request Consumer
> Date: Sat, 17 Nov 2001 18:10:20 -0800
> 
> > On Sat, Nov 17, 2001 at 02:21:40PM -0600, Glyph Lefkowitz wrote:
> > > On Sat, 2001-11-17 at 13:26, Kevin Turner wrote:
> > > > it seems like this should be at most two lines long:
> > > > 1) create Process
> > > > 2) designate the web Request as a consumer of the Process.
> > >
> > > [...] wrong. [...] you would be abandoning any further output to that
> > > webpage; the Process would take over and close it.
> > 
> > Well, for the purposes of discussion, because I don't understand how to
> > best use Process, let's say that's acceptable behavour.  It's okay if
> > the request is considered finished as soon as the process is.  Now, how
> > would I do it?
> > 
> 
> Didn't we come to the conclusion on IRC? I think the idea was
> 

[the idea]

> and your .epy would look something like

[an epy]

> Note that this code is guaranteed to be incomplete, but I think that's the
> general idea.

That's some creative handwaving. :)

Unfortunately, you can't FORGET_IT from an epy, so this isn't possible. 
If you want to take a look at how a resource does it, take a look at
CGIScript in twisted.web.twcgi.

In my Copious Free Time, I will attempt to write widgets that do this
and database queries.  Others are invited to do so as well.  Don't use
.epy scripts in the future if you can avoid it though; I want to remove
them from the distribution sometime in the very near future.

-- 
______      you are in a maze of twisted little applications, all
|   |_\     remarkably consistent.
|     |          -- glyph lefkowitz, glyph @ twisted matrix . com
|_____|             http://www.twistedmatrix.com/






More information about the Twisted-Python mailing list