[Twisted-web] some questions about twisted.web

Christopher Armstrong radix at twistedmatrix.com
Tue Apr 7 16:39:30 EDT 2009

On Tue, Apr 7, 2009 at 4:12 PM, Jack Moffitt <jack at chesspark.com> wrote:
>>> Which, as I recall, Glyph and others have discourged others from doing
>>> this.  Perhaps I am mistaken, but if twistd is intended for this
>>> purpose, why has this not become part of it all along?
>> I don't think anyone's discouraging twistd plugins. They're nice for
>> what they do. You may be thinking of mktap plugins. mktap is
>> deprecated.
> I didn't mean that plugins were discouraged.  I meant that contortions
> to allow twistd to take application specific command line options were
> actively discouraged.  See the following threads:
> http://twistedmatrix.com/pipermail/twisted-python/2006-June/013331.html
> http://twistedmatrix.com/pipermail/twisted-python/2005-May/010541.html
> http://twistedmatrix.com/pipermail/twisted-python/2005-June/010857.html
> These are pretty clear I think.  twistd is not intended for this use
> case.  The alternative currently is to embed config file reading into
> the tac (only solves part of the problem), or redo all the start up
> application infrastructure that twistd makes so nice.

I believe that all of those threads are in the context of tac files,
which are the things you use with the -y parameter to twistd. 'twistd
plugins' are a different thing, and one of the main design goals for
them was to take command line arguments. Also, those threads are very
old, and certain opinions may have changed. Anyway, I'm sure I know
about the intended usage for twistd plugins, because I implemented the
plugin system for twistd, and I did it with Jean-Paul's blessing. You
can trust me. :-)

I don't want to sound like I think twistd plugins are perfect, though.
They actually suck a lot, for various reasons. I hope you read my
words carefully and realize I'm only trying to clear up the piles upon
piles of miscommunication and bad advice in this thread by getting
some facts straight. For the record: I agree that the web with Twisted
situation is a mess, unlike Michal, and I think the TwistedWebPlan all
but admits that directly (hey, we have to be a *little* bit cheerful,
right?). A *lot* of work has gone into twisted.web-related stuff
recently, and a lot more is going to be put into it. This is mostly
thanks to people who have donated money to Twisted. If anyone wants
this work to continue, I strongly encourage you to donate (or get your
company to)!

If you want to do a personal donation, then you can use paypal or
Google Checkout by visiting

http://twistedmatrix.com/  (The donation area in on the left side,
right underneath the snakeball book).

More information about sponsorship is available at:


>> I don't understand the grammar in "why has this not become part of it
>> all along". Are you suggesting use of a time machine? I would love to,
>> if you made one available to me.
> What I meant is if writing a plugin for adding your own options to
> twistd is the recommended solution, why doesn't twistd just do this
> for us?  Surely someone would have done it by now.

I really can't understand you. The way I'm reading your first sentence
in this paragraph is so silly that I must be misreading the intention.
Maybe the problem is that you don't understand what twistd plugins
really are. If you care, I recommend reading the URL that Michal
referred to earlier:


> As we can see from
> the threads above, it's not done because they don't want it done.   It
> makes sense to me why this is so, and so I didn't attempt to do it
> this way in Tape.

As I pointed out above, those threads are either about something else
or are no longer representative of current opinion.

>>> This is disregarding the whole fact that none of already existing
>>> twistd options are at all revelevant to my users, and only serve to
>>> provide more noise.
>> If this is a command line non-daemon application, then you're right.
>> twistd is not really geared towards those. There are some vague ideas
>> for helping people write tools like that in a way that makes sense,
>> but nothing very concrete.
> It's a command line non-daemon app, but even if it were a temporary
> helper daemon you launched now and then, it would still apply.
> Twisted needs better help for this case, and that's what I've been
> attempting to say here all along.

I can't speak for the others in this thread, but if anyone denied that
Twisted needs help in the deployment or web areas, they're wrong. :-)

>> As for your initial list of things, I encourage you to file them as
>> bugs (making sure you search for existing bugs first).  They look
>> pretty reasonable. Some of them are probably just documentation bugs.
> Will do.  Thanks for your feedback.

You're welcome.

Christopher Armstrong

More information about the Twisted-web mailing list