Launching Multiple Servers

Andrew Dalke adalke at mindspring.com
Sat May 24 23:53:05 EDT 2003


Andrew Bennetts:
> No, "Perspective Broker" is a sane name for it, as a PB server is a broker
> for "perspectives".  There's now a doc regarding Perspectives that's not
> tied to PB (they're actually a Cred concept), which might help you a
little:
>
>     http://twistedmatrix.com/documents/howto/pclients

Okay, I'll take a look at that.  Thanks!

> Not
> to mention the North American bias -- Australians like myself don't expect
> to find jelly on a sandwich!

I like neither peanut butter nor bananas on a sandwich.  Straight jelly
for me.  Peanut butter goes on a graham cracker, and bananas are
eaten alone (just when the skin starts getting speckled), embedded in
gelatin (preferably cherry flavored), or in banana bread.  (The latter
is also very good with jelly.)

> I'm not an expert in this code, but twisted.python.log has been
> reimplemented in 1.0.5, and presumably it's better ;)

After my prodding ;)

> I'm not sure what you're referring to with "automatic prefix expansion I
> don't like"?

Twisted expands an option given it's prefix.  Suppose you have
an option like "--logfile", with no other options starting with "l" or
"lo" or "...". Then as I read the Twisted docs, it will automatically
expand "--log" to "--logfile".  This is what VMS did as well.
It seems good, but the problem is that people write scripts which
assume things will never change, so assume "--log" is the 'correct'
option.

Now add a new feature enabled by '--login'.  This also has the
prefix "--log", so will break scripts which expected '--log' to
match '--logfile' -- unless you explicitly add all the prefixes or
put in a "when multiple prefixes exist, prefer this one" option.

This makes things more confusing, so I would rather not allow
prefix support.

So my complaint about writing a new command-arg parser
in Twisted is not that a new one exists -- optparse shows that
getopt has problems -- it's that the behaviour implemented is
quite different from how Python or other packages work, and
is a behaviour that I would rather not have.

>  One big problem is that Twisted supports
> 2.2.0, and so requiring the 2.3 logging package would burden users with an
> extra dependency (ditto optparse/Optik).

Both the logging and optparse modules support older versions.
Include the code in Twisted, and in a few releases issues a
deprecated warning with a "from optparse import *" as the
implementation.

> On the other hand, asyncore already did asynchronous networking for
Python,
> and we've reimplemented that too -- but I think the result is something
much
> better than asyncore.  If we've reinvented something, there will be a
reason
> for it.  But as you point out, it can make life harder for our users.

I don't doubt there's a reason.  I worry that the reason doesn't always
consider the impact it has on people who aren't the implementors.

                    Andrew






More information about the Python-list mailing list