[Twisted-Python] Is there a 'development mode ' for twisted ?

2013-09-04 Thread a qi
HI, there I'm new to twisted, after reading the documents from twisted websites, I got some questions: 1. Is there a 'development mode ' for twisted ? like django, you can see your changes without restarting server. 2. Can I use django and twisted together? actually, I want

Re: [Twisted-Python] Asynchronously reading posted data

2013-09-04 Thread Glyph
On Sep 4, 2013, at 10:48 AM, Paul Wiseman wrote: > I'm still pretty new to twisted and feel I'm slowly getting the hang of it, > enough to realise that this line of code is probably going to block and not > do me any favours, the line is the first line in a resource.Resource > render_POST. >

[Twisted-Python] Asynchronously reading posted data

2013-09-04 Thread Paul Wiseman
I'm still pretty new to twisted and feel I'm slowly getting the hang of it, enough to realise that this line of code is probably going to block and not do me any favours, the line is the first line in a resource.Resource render_POST. json_request = json.loads(request.content.read()) The resource.

Re: [Twisted-Python] Passing additional arguments to errback

2013-09-04 Thread Laurens Van Houtven
Cześć Maciek :) In general, you can pass extra arguments when you call addCallback(s) or addErrback. They will get passed to the callback. However, as a side note to that code example, do you understand the difference between .addCallbacks(cb, eb) and: .addCallback(cb).addErrback(eb) and: .

[Twisted-Python] Can't check elements without uri in twisted.words.xish.domish.Element

2013-09-04 Thread Goffi
G'day, in the method "elements" of twisted.words.xish.domish.Element, the function "generateElementsQNamed" is called event if the uri if None, so the uri is checked against None instead of not checked at all. I think the function "generateElementsNamed" should be called instead, it looks li

[Twisted-Python] Passing additional arguments to errback

2013-09-04 Thread Maciej Wasilak
Dear list, I've found such a code example on "Stack Overflow" regarding errbacks: ___ class YourExample(object): def your_example(self): self.agent = Agent(reactor, pool=pool) self.deferred = self.agent.request( 'GET', se