[Twisted-Python] deferreds, and .rpy resources

Mario Ruggier mario at ruggier.org
Fri Jan 24 10:36:37 MST 2003


> On Fri, 24 Jan 2003 11:14:56 +0100
> Mario Ruggier <mario at ruggier.org> wrote:
>
>> 3. If i just import the reactor privately inside the render() method
>> (thus,
>> never call stop() on it), everything seems to work fine. But is this
>> the way it should be done?
>
> Yes. I'm not even sure why you need to get at the reactor at all.

Easy. Because i am morphing the example code bits around, to make
the same functionality addressable via an http request, and i swear that
when i tried removing he reactor (as i imagined it was not needed in
such a case) it **did** not work If i do not work! Now you point it out 
I
have tried removing it again, and now it does work just fine!!!

I suggest that one or both of these (corrected) examples be added to 
the list
of examples bundled with twisted, as i would expect that many 
prospective
users will not find this very obvious. If i knew what i was doing i 
would offer
to do it myself...

All the best, mario






More information about the Twisted-Python mailing list