[Twisted-Python] need help with waitForDeferred...

Thomas Jung Thomas.Jung at iisb.fraunhofer.de
Tue May 10 05:44:22 EDT 2005


On Tuesday 10 May 2005 11:18, Andrew Bennetts wrote:
> On Tue, May 10, 2005 at 10:25:10AM +0200, Thomas Jung wrote:
> > Hi everybody,
> >
> > I am new to twisted, and still experimenting.
> > Found the following code somewhere, looks very interesting,
> > but when I run the script (python 2.3.3), just nothing happens....
> > What am I missing ?
>
> [...]
>
> > @defer.deferredGenerator
> > def find(needle):
>
> The @decorator syntax is new in Python 2.4, so you'd get a SyntaxError if
> you tried to run this under Python 2.3.
>
> It works as expected for me with Python 2.4 and Twisted 2.0: it prints
>
>     I got my first deferred result
>     I found 'foo!' at character 29
>
> and then hangs.
>
> -Andrew.
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


too stupid ... just replaced that @ by a # ...
updated to 2.4.1, everything fine.

Thanks a lot !


-- 
Dr. Thomas Jung
Fraunhofer-Institut IISB
91058 Erlangen, Schottkystr. 10
+49 9131 761264




More information about the Twisted-Python mailing list