Re: [Twisted-Python] ESMTP extension

2009-05-29 Thread Nicolas Toper
AFAIK the ESMTP client handles these cases, not the server. See http://twistedmatrix.com/trac/browser/trunk/twisted/mail/protocols.py#L125 Maybe I did not get something. On Sat, May 30, 2009 at 1:19 AM, Jean-Paul Calderone wrote: > On Fri, 29 May 2009 21:08:59 -0500, Nicolas Toper wrote: >>No

Re: [Twisted-Python] ESMTP extension

2009-05-29 Thread Jean-Paul Calderone
On Fri, 29 May 2009 21:08:59 -0500, Nicolas Toper wrote: >No problem, just DIGEST-MD5. No need for PLAIN or LOGIN? > I think it handles PLAIN and LOGIN already (and CRAM-MD5). Maybe we're not talking about the same API? I was thinking about the ESMTP server. Jean-Paul

Re: [Twisted-Python] ESMTP extension

2009-05-29 Thread Nicolas Toper
No problem, just DIGEST-MD5. No need for PLAIN or LOGIN? On Fri, May 29, 2009 at 7:25 AM, Jean-Paul Calderone wrote: > On Fri, 29 May 2009 01:00:05 -0500, Nicolas Toper wrote: >>Hi, >> >>I am using SMTP-AUTH with Twisted. I have extended smtp.mail to handle >>LOGIN and PLAIN on the server side

Re: [Twisted-Python] Guidance on Proxy-type Application

2009-05-29 Thread glyph
On 08:24 am, michae...@gmail.com wrote: >2009/5/28 >Thanks for the very interesting example which I mainly follow apart >from the >lineReceived method in the ProxyClient, don't we need to add a callback >to >the deferred before appending it to the requestQueue? Definitely not! That would def

Re: [Twisted-Python] Reactor callback from the wrong thread

2009-05-29 Thread Itamar Shtull-Trauring
On Fri, 2009-05-29 at 09:02 +0200, Lars Ivar Igesund wrote: > Thanks for the tip, > > however - in which version was blockingCallFromThread added? Post-2.5.0 apparently. I suggest at least reading the code so you can see how it works. ___ Twisted-Pyt

Re: [Twisted-Python] reactor.stop() and deferToThead

2009-05-29 Thread Thomas Jakobsen
Thanks for the quick answers! Explicitly making stuff2() return as soon as it discovers that the reactor has stopped solves the problem. Regards, Thomas ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/ma

Re: [Twisted-Python] reactor.stop() and deferToThead

2009-05-29 Thread Dan
Python seems to intentionally make aborting threads nigh impossible. You're probably way better off doing something akin to this: def stuff2(): time.sleep(4) if reactor.running: print "stuff2 finished" else: print "Don't need to stuff2" Also ii

Re: [Twisted-Python] reactor.stop() and deferToThead

2009-05-29 Thread Jean-Paul Calderone
On Fri, 29 May 2009 14:22:43 +0200, Thomas Jakobsen wrote: >Hi > >It seems that things being deferredToThread continue to run even >though reactor.stop() is called. Threads cannot be interrupted. They will run until they function they are running returns. > >Output from the example below is: >

[Twisted-Python] reactor.stop() and deferToThead

2009-05-29 Thread Thomas Jakobsen
Hi It seems that things being deferredToThread continue to run even though reactor.stop() is called. Output from the example below is: stuff1 finished; stopping reactor stuff2 finished Is there a way to abort the remaining execution of stuff2 in this case? It would be handy if, say, some except

Re: [Twisted-Python] ESMTP extension

2009-05-29 Thread Jean-Paul Calderone
On Fri, 29 May 2009 01:00:05 -0500, Nicolas Toper wrote: >Hi, > >I am using SMTP-AUTH with Twisted. I have extended smtp.mail to handle >LOGIN and PLAIN on the server side (the version I have handles only >CRAM-MD5). I am adding currently DIGEST-MD5. > >Do you want a patch? > >If yes, what is the

Re: [Twisted-Python] Automatic test for Twisted

2009-05-29 Thread Reza Lotun
On Fri, May 29, 2009 at 3:01 AM, David Ripton wrote: > Another option is nose.  Google for "nose.twistedtools" I've used nose for twisted unittests - and it usually works fine for my purposes. Just to expand a bit on how *I've* used it: from nose.twistedtools import deferred from twisted.intern

Re: [Twisted-Python] Guidance on Proxy-type Application

2009-05-29 Thread Michael Thompson
2009/5/29 Michael Thompson > 2009/5/28 > >> >> On 01:23 am, asb.b...@gmail.com wrote: >> >>> I have just started to look at the Twisted framework and would like to >>> put it >>> to use for a new project I am working on. Not being very familiar with >>> the >>> framework and fairly new to Pytho

Re: [Twisted-Python] Guidance on Proxy-type Application

2009-05-29 Thread Michael Thompson
2009/5/28 > > On 01:23 am, asb.b...@gmail.com wrote: > >> I have just started to look at the Twisted framework and would like to put >> it >> to use for a new project I am working on. Not being very familiar with >> the >> framework and fairly new to Python in general I would like to ask a >> de

Re: [Twisted-Python] Reactor callback from the wrong thread

2009-05-29 Thread Lars Ivar Igesund
Thanks for the tip, however - in which version was blockingCallFromThread added? It did not wish to be imported from the version I installed via Ubuntu which appears to be 2.5.0. (Bit confused about the version numbering though since Twisted appears to be at something like 8.2) Best, Lars Ivar O