[Zope-Coders] Re: [Zope-Checkins] CVS: Zope - z2.py:1.62

Matt Behrens matt@zigg.com
Sat, 27 Apr 2002 09:54:18 -0400


Because I /love/ reigniting long-cold arguments...

On Wed, Mar 13, 2002 at 01:49:35PM -0500, Matt Behrens wrote:

> > Modified Files:
> > 	z2.py 
> 
> > +  --icp port

> Is there any particular reason this needs to be a long option?  -I is
> free.  

I just discovered where this causes problems.  zctl (and, by
extension, my 'zope' control utility work, coming to a branch near
you soon once I work out the last few nits) currently depends on
z2.py options being single-dashed, so that you can specify Zope and
ZEO command-ine options when starting, i.e.:

zctl.py start --zope -a 1 -b -c --zeo -a -b 5 -c

Currently, zctl, when it sees '--zope' or '--zeo', builds a list
of arguments until it finds the next argument that starts with '--'.
So right off, '--icp' is going to break zctl.py installations, even
if they are not all that widespread.  '-I' won't.  If backwards
compatibility is at all a concern, we at least need to /support/
'-I', and I think it's better as the /only/ way.

Now, obviously, 'zope' doesn't have to operate this way.  The
preferred method of operation is going to be putting this sort of
stuff in an instance.conf file:

[ZServer]
HTTP=8080
ICP=1234,5678

and so, then, for command-line overrides we could do quasi-ssh-style
options like

zope start instance -o ZServer.HTTP=8080 -o ZServer.ICP=1234,5678 \
	-o ZEO.Foo=Bar -o ZEO.Baz=Quux

or maybe something like this

zope start instance --zserver-options HTTP=8080 ICP=1234,5678 \
	--zeo-options Foo=Bar Baz=Quux

although that one brings us back to ambiguity.

I think consistency is very valuable here, both with ourselves and
with other UNIX tools, and would appreciate if we all could reach
a consensus here.