Re: [Twisted-Python] Deferred on PyPI

2009-12-08 Thread Jonathan Lange
On Mon, Dec 7, 2009 at 10:35 AM, wrote: > On 09:10 pm, j...@mumak.net wrote: >> On Mon, Dec 7, 2009 at 6:29 AM,   wrote: >>> On 09:26 am, j...@mumak.net wrote: A while ago at EuroPython, Mikeal Rogers and I talked about Deferreds and how they don't really depend on the rest of Twis

[Twisted-Python] serialport protocol as a service

2009-12-08 Thread Aníbal Pacheco
Hello list, Is there any way to get a service like the twisted.internet.TCPServer but for serialport? I read the serialport code but couldn't figure out how to build such an analogy with the tcp server. The goal I wanna reach is to attach this "serial port service" to my service.MultiService

[Twisted-Python] reactor.callLater() or reactor.callFromThread() when sending msg just before quit

2009-12-08 Thread Gabriel Rossetti
Hello everyone, I have to send a message just before my service quits, but sometimes the reactor quits before the msg is sent. I was wondering if I should user reactor.callLater like so : self.sendMessage(msg) reactor.callLater(1, self.stop) (which I don't really like), or use reactor.callFromT

Re: [Twisted-Python] reactor.callLater() or reactor.callFromThread() when sending msg just before quit

2009-12-08 Thread exarkun
On 12:50 pm, gabriel.rosse...@arimaz.com wrote: >Hello everyone, > >I have to send a message just before my service quits, but sometimes >the >reactor quits before the msg is sent. >I was wondering if I should user reactor.callLater like so : > >self.sendMessage(msg) >reactor.callLater(1, self.sto

Re: [Twisted-Python] reactor.callLater() or reactor.callFromThread() when sending msg just before quit

2009-12-08 Thread Itamar Turner-Trauring (aka Shtull-Trauring)
On Tue, 2009-12-08 at 13:50 +0100, Gabriel Rossetti wrote: > I have to send a message just before my service quits, but sometimes the > reactor quits before the msg is sent. > I was wondering if I should user reactor.callLater like so : ... > (which I don't really like), or use reactor.callFromThr

Re: [Twisted-Python] Deferred on PyPI

2009-12-08 Thread Glyph Lefkowitz
On Dec 8, 2009, at 4:50 AM, Jonathan Lange wrote: > On Mon, Dec 7, 2009 at 10:35 AM, wrote: >> On 09:10 pm, j...@mumak.net wrote: >>> On Mon, Dec 7, 2009 at 6:29 AM, wrote: On 09:26 am, j...@mumak.net wrote: > > A while ago at EuroPython, Mikeal Rogers and I talked about Deferre

Re: [Twisted-Python] serialport protocol as a service

2009-12-08 Thread Lucas Taylor
On 12/8/09 5:24 AM, Aníbal Pacheco wrote: > Hello list, > > Is there any way to get a service like the twisted.internet.TCPServer > but for serialport? > > I read the serialport code but couldn't figure out how to build such an > analogy with the tcp server. > > The goal I wanna reach is to at

[Twisted-Python] Twistd logging

2009-12-08 Thread Landreville
Is there a way I can customize the format of log file? I want to add more information to each line (about the xmlrpc method being called), but I can't find where these lines get written out. I know I can print a message to the log in my _getFunction, but I would prefer to have one line per request.

Re: [Twisted-Python] serialport protocol as a service

2009-12-08 Thread Aníbal Pacheco
On 12/08/2009 05:50 PM, Lucas Taylor wrote: > On 12/8/09 5:24 AM, Aníbal Pacheco wrote: >> Hello list, >> >> Is there any way to get a service like the twisted.internet.TCPServer >> but for serialport? >> >> I read the serialport code but couldn't figure out how to build such an >> analogy with the

[Twisted-Python] A resizable cooperator class for queuing and dispatching jobs

2009-12-08 Thread Terry Jones
I just wrote a fun class that lets you - submit jobs to be dispatched to a queue - manage how many tasks are in progress at once - dynamically adjust that number - shut down cleanly, including - recovering jobs that were queued but hadn't been dispatched This uses a combination of