Re: [Twisted-Python] Could Service.startService return a Deferred?

2013-11-28 Thread Peter Westlake
On Wed, Nov 27, 2013, at 19:20, exar...@twistedmatrix.com wrote: > On 06:00 pm, peter.westl...@pobox.com wrote: ... > >class Runner(service.Service): > >def __init__(self, baton): > >self.baton = baton > > > >def startService(self): > >print 'startService', self.name, reac

Re: [Twisted-Python] Could Service.startService return a Deferred?

2013-11-28 Thread Dustin J. Mitchell
This is kind of an ongoing bugaboo for me, too. Buildbot uses services *heavily*, and at runtime (to support reconfigs, etc.). We've had to work around issues like stop being called before asynchronous starts complete using DeferredLocks and other such fun. I filed a bug with some of my issues -

Re: [Twisted-Python] Could Service.startService return a Deferred?

2013-11-28 Thread Peter Westlake
On Wed, Nov 27, 2013, at 19:20, exar...@twistedmatrix.com wrote: ... > What about something like this instead? > > @implementer(IService) > class Runner(object): > ... > @classmethod > def loadFromWhatever(cls, name): > return deferLater(reactor, Runner, name) > >

Re: [Twisted-Python] IMAP4 Proxy to add headers and modify body of an incoming message

2013-11-28 Thread Krzysztof Oblucki
I will do that. I'm struggling with doing this myself so far because of my noobness but making small progress every day. Sent from my BatPhone > On Nov 27, 2013, at 23:34, Glyph wrote: > > > On Nov 27, 2013, at 6:39 PM, Krzysztof Oblucki wrote: Am I on the right track? Is imap4 lib the

Re: [Twisted-Python] IMAP4 Proxy to add headers and modify body of an incoming message

2013-11-28 Thread Glyph
On Nov 28, 2013, at 12:10 PM, Krzysztof Oblucki wrote: > I will do that. I'm struggling with doing this myself so far because of my > noobness but making small progress every day. Feel free to ask here for any help you might need :). -glyph ___ Twis

Re: [Twisted-Python] IMAP4 Proxy to add headers and modify body of an incoming message

2013-11-28 Thread Krzysztof Oblucki
It would be great if I could get some pointers as to the correct way of doing it. If I were to start with search_DELETED what would be your recommendation? Sent from my BatPhone > On Nov 28, 2013, at 20:07, Glyph wrote: > >> On Nov 28, 2013, at 12:10 PM, Krzysztof Oblucki wrote: >> >> I will