Re: [Twisted-Python] handling CTRL-C

2009-04-30 Thread Fabrizio Mancini
> The best way is to have an IService provider with a stopService method > which does whatever shutdown cleanup you want done, possibly returning > a Deferred which doesn't fire until it has finished.  However your app > is shut down, this will cause your cleanup code to run. Thank you, i will stu

Re: [Twisted-Python] handling CTRL-C

2009-04-30 Thread Fabrizio Mancini
On Thu, Apr 30, 2009 at 3:04 PM, Itamar Shtull-Trauring wrote: > On Thu, 2009-04-30 at 14:44 +0200, Fabrizio Mancini wrote: >> Hi, >> i know twisted already manage CTRL-C keystroke, but i'd like to add >> some other action when CTRL-C is pressed. >> I've implemented a perspective broker server, wh

Re: [Twisted-Python] handling CTRL-C

2009-04-30 Thread Jean-Paul Calderone
On Thu, 30 Apr 2009 14:44:08 +0200, Fabrizio Mancini wrote: >Hi, >i know twisted already manage CTRL-C keystroke, but i'd like to add some >other action when CTRL-C is pressed. >I've implemented a perspective broker server, which have a DeferredQueue and >a lot of elements in it. >I'd like to writ

Re: [Twisted-Python] handling CTRL-C

2009-04-30 Thread Itamar Shtull-Trauring
On Thu, 2009-04-30 at 14:44 +0200, Fabrizio Mancini wrote: > Hi, > i know twisted already manage CTRL-C keystroke, but i'd like to add > some other action when CTRL-C is pressed. > I've implemented a perspective broker server, which have a > DeferredQueue and a lot of elements in it. > I'd like to

[Twisted-Python] handling CTRL-C

2009-04-30 Thread Fabrizio Mancini
Hi, i know twisted already manage CTRL-C keystroke, but i'd like to add some other action when CTRL-C is pressed. I've implemented a perspective broker server, which have a DeferredQueue and a lot of elements in it. I'd like to write to a file all those elements before the program shuts down. Is th