Re: [Twisted-Python] getPage generates a traceback in abstract.py

2010-10-01 Thread Ivan Kozik
On Sat, Oct 2, 2010 at 01:01, Jason J. W. Williams wrote: > I'm really pulling my hair out here. The code in question uses getPage: > http://gist.github.com/607124 > If I remove the postdata argument to getPage no problem (except the postdata > is required by server I'm calling). However, no matte

[Twisted-Python] getPage generates a traceback in abstract.py

2010-10-01 Thread Jason J. W. Williams
I'm really pulling my hair out here. The code in question uses getPage: http://gist.github.com/607124 If I remove the postdata argument to getPage no problem (except the postdata is required by server I'm calling). However, no matter what I put in postdata, I get this: http://gist.github.com/607

Re: [Twisted-Python] Unable to start twistd service on Ubuntu 10.04 when using pseudo terminal

2010-10-01 Thread Garret Heaton
Thanks, that explains everything. The code I was using to test was copied from Twisted's daemonizing function: http://github.com/powdahound/twisted/blob/master/twisted/scripts/_twistd_unix.py#L155-169 It should probably be updated before more users upgrade to the new kernel and run into this issue

Re: [Twisted-Python] how to write a safe catch-all

2010-10-01 Thread Chris Withers
On 01/10/2010 15:00, exar...@twistedmatrix.com wrote: >> I hope this helps, do let me know if I should add it to an issue >> somewhere... > > Can you at least provide a traffic capture recording an instance of this > happening? I'm afraid not, I didn't have the forsight to do this at the time, and

Re: [Twisted-Python] how to write a safe catch-all

2010-10-01 Thread exarkun
On 01:30 pm, ch...@simplistix.co.uk wrote: >Hi Glyph, > >On 30/09/2010 19:52, Glyph Lefkowitz wrote: >>>File "Twisted-8.2.0-py2.5-linux-x86_64.egg/twisted/internet/base.py", >>>line 757, in runUntilCurrent >>>call.func(*call.args, **call.kw) >>>File "test_looping.py", line 24, in __call__ >>>del se

Re: [Twisted-Python] how to write a safe catch-all

2010-10-01 Thread Chris Withers
Hi Glyph, On 30/09/2010 19:52, Glyph Lefkowitz wrote: >> File "Twisted-8.2.0-py2.5-linux-x86_64.egg/twisted/internet/base.py", >> line 757, in runUntilCurrent >> call.func(*call.args, **call.kw) >> File "test_looping.py", line 24, in __call__ >> del self.connector >> exceptions.AttributeError: Bre

Re: [Twisted-Python] The Real Error (tm) [was Re: how to write a safe catch-all]

2010-10-01 Thread Phil Mayers
On 01/10/10 14:19, Chris Withers wrote: > On 30/09/2010 18:01, Phil Mayers wrote: >> It is more than a little confusing, and I'm sure frustrating. >> >> I've tried to produce something like this locally, but cannot. > > The very first message in this thread (28th Sept, 14:48) and my email of > 30th

Re: [Twisted-Python] Limiting a task.Cooperator to N work units / sec

2010-10-01 Thread exarkun
On 12:58 pm, p.may...@imperial.ac.uk wrote: >On 01/10/10 13:46, exar...@twistedmatrix.com wrote: >>On 09:41 am, p.may...@imperial.ac.uk wrote: >>>Is there an easy way to make a task.Cooperator instance only execute >>>N >>>ticks / sec, summed across all iterators it's driving? So if you add >>>two

Re: [Twisted-Python] The Real Error (tm) [was Re: how to write a safe catch-all]

2010-10-01 Thread Chris Withers
On 30/09/2010 18:01, Phil Mayers wrote: > It is more than a little confusing, and I'm sure frustrating. > > I've tried to produce something like this locally, but cannot. The very first message in this thread (28th Sept, 14:48) and my email of 30th Sept, 14:36 both had scripts attached which do e

Re: [Twisted-Python] Limiting a task.Cooperator to N work units / sec

2010-10-01 Thread Phil Mayers
On 01/10/10 13:46, exar...@twistedmatrix.com wrote: > On 09:41 am, p.may...@imperial.ac.uk wrote: >> Is there an easy way to make a task.Cooperator instance only execute N >> ticks / sec, summed across all iterators it's driving? So if you add >> two >> iterators, they each run at N/2 per sec, 3 at

Re: [Twisted-Python] Limiting a task.Cooperator to N work units / sec

2010-10-01 Thread exarkun
On 09:41 am, p.may...@imperial.ac.uk wrote: >Is there an easy way to make a task.Cooperator instance only execute N >ticks / sec, summed across all iterators it's driving? So if you add >two >iterators, they each run at N/2 per sec, 3 at N/3, etc. > >It seems like this ought to do it: Very close!

[Twisted-Python] Limiting a task.Cooperator to N work units / sec

2010-10-01 Thread Phil Mayers
Is there an easy way to make a task.Cooperator instance only execute N ticks / sec, summed across all iterators it's driving? So if you add two iterators, they each run at N/2 per sec, 3 at N/3, etc. It seems like this ought to do it: N = def myScheduler(x): # reschedule N times per second