Re: [Twisted-Python] reactor.stop() and thread and wxPython problem

2009-01-16 Thread Reza Lotun
Hi Gabriel, I don't quite understand your question. Do you mean to say that you have written some code with wx and Twisted in an integrated event loop, and are doing something like reactor.callInThread(someCall), and when you call reactor.stop the app doesn't exit? AFAIK, any thread spawning goes

[Twisted-Python] Write into a persistent connection before stopping

2009-01-16 Thread Boeuf, Jean-Francois
Hello, I have an application using twisted in which the web browser opens a persistent connection when a user logs in (COMET model). I want to write data into active persistent connections at server stop to notify client to logout properly. To do that, I add a system event trigger to the reacto

Re: [Twisted-Python] reactor.stop() and thread and wxPython problem

2009-01-16 Thread Gabriel Rossetti
Reza Lotun wrote: Hi Gabriel, I don't quite understand your question. Do you mean to say that you have written some code with wx and Twisted in an integrated event loop, and are doing something like reactor.callInThread(someCall), and when you call reactor.stop the app doesn't exit? AFAIK, any

Re: [Twisted-Python] reactor.stop() and thread and wxPython problem

2009-01-16 Thread Stephen Waterbury
Reza Lotun wrote: * Have the reactor run in a seperate thread from wx (making sure to use reactor.run(installSignalHandlers=False)) * Spawn threads from wx->Twisted in the proper way: use reactor.callFromThread(reactor.callInThread(someCall)) I'd second that -- I've used the pattern described h

Re: [Twisted-Python] reactor.stop() and thread and wxPython problem

2009-01-16 Thread Reza Lotun
>> * Have the reactor run in a seperate thread from wx (making sure to >> use reactor.run(installSignalHandlers=False)) >> * Spawn threads from wx->Twisted in the proper way: use >> reactor.callFromThread(reactor.callInThread(someCall)) A small point, but my code snippet example should have been:

Re: [Twisted-Python] django with twisted 8.2.x: 2009

2009-01-16 Thread Alex Clemesha
Vlad, I appreciate you detailed response, thanks. > > If yo have a really long running tasks, I suggest you donot > 'bind' gui into those -- and instead do what I am doing -- just > submit requests to the database, have background servers process them > and then change the status of the request to

Re: [Twisted-Python] Tracebacks being dropped from exceptions when using inlineCallbacks

2009-01-16 Thread Phil Christensen
On Jan 12, 2009, at 8:36 PM, Terry Jones wrote: I think I've finally gotten to the bottom of why exceptions sometimes lose their tracebacks when using inlineCallbacks. [snip] We make a failure object, it has a traceback, but after passing it to the errback method on a deferred the tracebac

Re: [Twisted-Python] Tracebacks being dropped from exceptions when using inlineCallbacks

2009-01-16 Thread Terry Jones
Hi Phil > "Phil" == Phil Christensen writes: Phil> On Jan 12, 2009, at 8:36 PM, Terry Jones wrote: >> # added 2003-06-23. See comment above in __init__ >> c['tb'] = None >> >> But the comment in __init__ seems to have been deleted. Phil> The comment was this: Phil> # added 2003-06-23 by Ch

[Twisted-Python] getProcessOutput on windows

2009-01-16 Thread Shawn Church
I am developing an application on Linux for deployment on Windows. I want to use the getProcessOutput function but seem to remember problems with the windows reactor and processes last time I tried this (a couple years ago). I've gone through the active bugs and did not see anything critical to my

Re: [Twisted-Python] Tracebacks being dropped from exceptions when using inlineCallbacks

2009-01-16 Thread Christopher Armstrong
On Fri, Jan 16, 2009 at 7:28 PM, Phil Christensen wrote: > The comment was this: > ># added 2003-06-23 by Chris Armstrong. Yes, I actually have a ># use case where I need this traceback object, and I've made ># sure that it'll be cleaned up. >self.tb = tb > > presum

Re: [Twisted-Python] Tracebacks being dropped from exceptions when using inlineCallbacks

2009-01-16 Thread glyph
On 02:31 am, ra...@twistedmatrix.com wrote: On Fri, Jan 16, 2009 at 7:28 PM, Phil Christensen wrote: Keeping references to tracebacks still has many potential pitfalls. It's a fundamental problem: tracebacks refer to all their frames, which refer to all their locals; this makes it *really* e