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

2009-12-09 Thread Terry Jones
glyph> Heh. For something in a pastebin, that's all I got :). Stick it in glyph> version control somewhere! Will do. I'm just adding pause/resume, following the suggestion of Dave Peticolas (thanks Dave). Terry ___ Twisted-Python mailing list Twiste

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

2009-12-09 Thread Glyph Lefkowitz
On Dec 9, 2009, at 4:44 PM, Terry Jones wrote: > But the code Glyph, the code? Or have I graduated to the point where I no > longer need a laconic garotting? I think the combo of a DeferredQueue and > a task.Cooperator is pretty deadly. Heh. For something in a pastebin, that's all I got :). St

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

2009-12-09 Thread Dave Peticolas
Terry Jones wrote: > 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 dispat

Re: [Twisted-Python] HTML shoudl not be baked into twisted.web HTTPimplementation

2009-12-09 Thread Johann Borck
Jared Gisin wrote: > It's unambiguously the correct default if you incorrectly assume that > you're always dealing with a web browser client, which is an invalid > assumption. > > It's not always - it is almost always, a textbook example for the applicability of a sensible default. > The botto

Re: [Twisted-Python] HTML shoudl not be baked into twisted.web HTTPimplementation

2009-12-09 Thread exarkun
On 01:10 am, jared.gi...@isilon.com wrote: >It's unambiguously the correct default if you incorrectly assume that >you're always dealing with a web browser client, which is an invalid >assumption. You've said that the current behavior is wrong, and you're saying that it's wrong to preserve the cu

Re: [Twisted-Python] Deferred on PyPI

2009-12-09 Thread exarkun
On 12:12 am, gl...@twistedmatrix.com wrote: > >When Deferred is in the standard library, it will enable communication >between code written for different asynchronous backends, which is not >currently possible. Let's be careful how we talk about Deferred, particularly when involving the standar

Re: [Twisted-Python] HTML shoudl not be baked into twisted.web HTTPimplementation

2009-12-09 Thread sstein...@gmail.com
On Dec 9, 2009, at 8:10 PM, Jared Gisin wrote: > It's unambiguously the correct default if you incorrectly assume that > you're always dealing with a web browser client, which is an invalid > assumption. > > The bottom line is that twisted.web contains the only implement of HTTP > in twisted whic

Re: [Twisted-Python] HTML shoudl not be baked into twisted.web HTTPimplementation

2009-12-09 Thread Jared Gisin
It's unambiguously the correct default if you incorrectly assume that you're always dealing with a web browser client, which is an invalid assumption. The bottom line is that twisted.web contains the only implement of HTTP in twisted which unfortunately is muddled in HTML. Get the HTML out of th

Re: [Twisted-Python] Deferred on PyPI

2009-12-09 Thread Glyph Lefkowitz
On Dec 9, 2009, at 4:01 PM, Mikhail Terekhov wrote: > On Wed, Dec 9, 2009 at 3:27 AM, Jonathan Lange wrote: > ... >> >> I completely screwed up with the advanced English usage then. :( > IMHO it is very simple: extracting Deferreds out of Twisted would benefit (if > at all) only people who do

Re: [Twisted-Python] Twistd logging

2009-12-09 Thread Lucas Taylor
On 12/9/09 11:14 AM, Landreville wrote: > > > On Wed, Dec 9, 2009 at 12:26 PM, > wrote: > > On 8 Dec, 09:04 pm, landrevi...@deadtreepages.com > wrote: > >Is there a way I can customize the format of log file? >

Re: [Twisted-Python] HTML shoudl not be baked into twisted.web HTTP implementation

2009-12-09 Thread Terry Jones
> "James" == James Y Knight writes: James> Essentially every web server on the internet responds with HTML to James> error conditions, so you should probably modify your client. But there are plenty of clients that can't or don't want to or shouldn't have to handle HTML. James> As I said, I'

Re: [Twisted-Python] HTML shoudl not be baked into twisted.web HTTP implementation

2009-12-09 Thread Konrads Smelkovs
I think that the days when one line logger ala syslog is useful are nearing its end. Html in logs looks only ugly if log consumer makes them so. 2009/12/9, Valeriy Zamarayev : > > On Dec 9, 2009, at 19:34, James Y Knight wrote: >> On Dec 9, 2009, at 11:52 AM, Jared Gisin wrote: >>> I’m writing a H

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

2009-12-09 Thread Terry Jones
> "Glyph" == Glyph Lefkowitz writes: Glyph> On Dec 8, 2009, at 11:09 PM, Terry Jones wrote: >> 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,

Re: [Twisted-Python] HTML shoudl not be baked into twisted.web HTTP implementation

2009-12-09 Thread James Y Knight
On Dec 9, 2009, at 4:18 PM, Valeriy Zamarayev wrote: > I want to second Jared's point. In my case, the responses from web servers, > including the body, often end up in log files. HTML looks pretty ugly there. > Though this is a minor point for me in the otherwise great Twisted software! Essen

Re: [Twisted-Python] HTML shoudl not be baked into twisted.web HTTP implementation

2009-12-09 Thread Valeriy Zamarayev
On Dec 9, 2009, at 19:34, James Y Knight wrote: > On Dec 9, 2009, at 11:52 AM, Jared Gisin wrote: >> I’m writing a HTTP server that exposes various resources as an API. >> Unless I’m missing something, twisted’s HTTP protocol >> implementation is in twisted.web.http. >> >> The problem with thi

Re: [Twisted-Python] Deferred on PyPI

2009-12-09 Thread Mikhail Terekhov
On Wed, Dec 9, 2009 at 3:27 AM, Jonathan Lange wrote: ... > > I completely screwed up with the advanced English usage then. :( > IMHO it is very simple: extracting Deferreds out of Twisted would benefit (if at all) only people who do not use or develop Twisted. From the packaging point of view r

Re: [Twisted-Python] Twistd logging

2009-12-09 Thread Landreville
On Wed, Dec 9, 2009 at 12:26 PM, wrote: > On 8 Dec, 09:04 pm, landrevi...@deadtreepages.com wrote: > >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

Re: [Twisted-Python] HTML shoudl not be baked into twisted.web HTTP implementation

2009-12-09 Thread James Y Knight
On Dec 9, 2009, at 11:52 AM, Jared Gisin wrote: > I’m writing a HTTP server that exposes various resources as an API. Unless > I’m missing something, twisted’s HTTP protocol implementation is in > twisted.web.http. > > The problem with this package is that it’s inexplicably wrapped up in HTML.

Re: [Twisted-Python] HTML shoudl not be baked into twisted.web HTTP implementation

2009-12-09 Thread exarkun
On 04:52 pm, jared.gi...@isilon.com wrote: >I'm writing a HTTP server that exposes various resources as an API. >Unless I'm missing something, twisted's HTTP protocol implementation is >in twisted.web.http. > >The problem with this package is that it's inexplicably wrapped up in >HTML. HTML has not

Re: [Twisted-Python] Twistd logging

2009-12-09 Thread exarkun
On 8 Dec, 09:04 pm, landrevi...@deadtreepages.com wrote: >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

[Twisted-Python] HTML shoudl not be baked into twisted.web HTTP implementation

2009-12-09 Thread Jared Gisin
I'm writing a HTTP server that exposes various resources as an API. Unless I'm missing something, twisted's HTTP protocol implementation is in twisted.web.http. The problem with this package is that it's inexplicably wrapped up in HTML. HTML has nothing to do with HTTP as a whole. Sure, HTML i

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

2009-12-09 Thread Glyph Lefkowitz
On Dec 8, 2009, at 11:09 PM, Terry Jones wrote: > 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 que

Re: [Twisted-Python] Deferred on PyPI

2009-12-09 Thread Glyph Lefkowitz
On Dec 9, 2009, at 3:27 AM, Jonathan Lange wrote: > On Wed, Dec 9, 2009 at 2:42 AM, Glyph Lefkowitz > wrote: >> but my agreement is contingent upon the theoretical existence of things like >> "a good package manager for Python" and "installation instructions on our >> website which clearly ex

Re: [Twisted-Python] Deferred on PyPI

2009-12-09 Thread exarkun
On 08:27 am, j...@mumak.net wrote: On Wed, Dec 9, 2009 at 2:42 AM, Glyph Lefkowitz wrote: 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

Re: [Twisted-Python] Deferred on PyPI

2009-12-09 Thread Jonathan Lange
On Wed, Dec 9, 2009 at 2:42 AM, Glyph Lefkowitz wrote: > > 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