From guido@python.org  Wed Nov 13 15:54:11 2002
From: guido@python.org (Guido van Rossum)
Date: Wed, 13 Nov 2002 10:54:11 -0500
Subject: [getopt-sig] Adopting Optik
Message-ID: <200211131554.gADFsBw28797@odiug.zope.com>

I want to start working on an alpha release of Python 2.3.  I'd like
to be able to release 2.3a1 before Xmas.  PEP 283 has a list of things
to be done.  One of the tasks is to adopt Greg Ward's options parsing
module, Optik.  I propose to adopt this under the name "options".  Any
comments?

--Guido van Rossum (home page: http://www.python.org/~guido/)


From guido@python.org  Wed Nov 13 16:40:27 2002
From: guido@python.org (Guido van Rossum)
Date: Wed, 13 Nov 2002 11:40:27 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: Your message of "Wed, 13 Nov 2002 17:30:25 +0100."
 <m18C0PJ-00CmEpC@artcom0.artcom-gmbh.de>
References: <m18C0PJ-00CmEpC@artcom0.artcom-gmbh.de>
Message-ID: <200211131640.gADGeRT29280@odiug.zope.com>

> > I want to start working on an alpha release of Python 2.3.  I'd like
> > to be able to release 2.3a1 before Xmas.  PEP 283 has a list of things
> > to be done.  One of the tasks is to adopt Greg Ward's options parsing
> > module, Optik.  I propose to adopt this under the name "options".  Any
> > comments?
> 
> What about the discussion in May 2002:
>     http://mail.python.org/pipermail/getopt-sig/2002-May/000191.html

Looking at the code, I think there are too many classes to speak about
a single dominant class; then the guideline becomes "use short,
lower-case module names".  Cute names are against Python's tradition IMO.

> Since some projects (for exmaple docutils) already started to use
> Optik it is becoming increasingly late for a name change.

The docutils author can speak for himself; I think docutils can deal
with the change.  It's also simple enough to add something like this:

try:
  from options import OptionParse
except ImportError:
  from optik import OptionParse

--Guido van Rossum (home page: http://www.python.org/~guido/)


From pf@artcom-gmbh.de  Wed Nov 13 17:24:14 2002
From: pf@artcom-gmbh.de (Peter Funk)
Date: Wed, 13 Nov 2002 18:24:14 +0100 (CET)
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211131640.gADGeRT29280@odiug.zope.com> from Guido van Rossum
 at "Nov 13, 2002 11:40:27 am"
Message-ID: <m18C1FO-00CmvyC@artcom0.artcom-gmbh.de>

Hi,

Guido van Rossum:
[...]
> >     http://mail.python.org/pipermail/getopt-sig/2002-May/000191.html
> 
> Looking at the code, I think there are too many classes to speak about
> a single dominant class; 
[...]
I beg to differ.  In 
     http://mail.python.org/pipermail/getopt-sig/2002-May/000204.html
Greg wrote:
    '''I strongly prefer OptionParser, because that's the main class; it's the
       one that's always used (ie. directly instantiated).  There are always
       instances of Option, OptionValues, and the various exception classes
       floating around -- but most Optik applications don't have to import
       those names directly.'''

Regards, Peter
-- 
Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany
office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen, Germany)



From guido@python.org  Wed Nov 13 17:34:13 2002
From: guido@python.org (Guido van Rossum)
Date: Wed, 13 Nov 2002 12:34:13 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: Your message of "Wed, 13 Nov 2002 18:24:14 +0100."
 <m18C1FO-00CmvyC@artcom0.artcom-gmbh.de>
References: <m18C1FO-00CmvyC@artcom0.artcom-gmbh.de>
Message-ID: <200211131734.gADHYDI04190@odiug.zope.com>

[PF]
> I beg to differ.  In 
>      http://mail.python.org/pipermail/getopt-sig/2002-May/000204.html
> Greg wrote:
>     '''I strongly prefer OptionParser, because that's the main class; it's the
>        one that's always used (ie. directly instantiated).  There are always
>        instances of Option, OptionValues, and the various exception classes
>        floating around -- but most Optik applications don't have to import
>        those names directly.'''

Too bad.  Greg also said he preferred short lowercase module names.

--Guido van Rossum (home page: http://www.python.org/~guido/)


From hpk@devel.trillke.net  Wed Nov 13 17:45:53 2002
From: hpk@devel.trillke.net (holger krekel)
Date: Wed, 13 Nov 2002 18:45:53 +0100
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211131734.gADHYDI04190@odiug.zope.com>; from guido@python.org on Wed, Nov 13, 2002 at 12:34:13PM -0500
References: <m18C1FO-00CmvyC@artcom0.artcom-gmbh.de> <200211131734.gADHYDI04190@odiug.zope.com>
Message-ID: <20021113184553.F14762@prim.han.de>

[Guido van Rossum Wed, Nov 13, 2002 at 12:34:13PM -0500]
> [PF]
> > I beg to differ.  In 
> >      http://mail.python.org/pipermail/getopt-sig/2002-May/000204.html
> > Greg wrote:
> >     '''I strongly prefer OptionParser, because that's the main class; it's the
> >        one that's always used (ie. directly instantiated).  There are always
> >        instances of Option, OptionValues, and the various exception classes
> >        floating around -- but most Optik applications don't have to import
> >        those names directly.'''
> 
> Too bad.  Greg also said he preferred short lowercase module names.

But 'options' is not as descriptive as 'OptionParser'.

To me it compares to 'urlparse'.  We don't say 'import url'.

regards,

    holger


From drifty@bigfoot.com  Wed Nov 13 21:29:24 2002
From: drifty@bigfoot.com (Brett Cannon)
Date: Wed, 13 Nov 2002 13:29:24 -0800 (PST)
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211131554.gADFsBw28797@odiug.zope.com>
Message-ID: <Pine.SOL.4.44.0211131322370.9925-100000@death.OCF.Berkeley.EDU>

[Guido van Rossum]

> I want to start working on an alpha release of Python 2.3.  I'd like
> to be able to release 2.3a1 before Xmas.  PEP 283 has a list of things
> to be done.  One of the tasks is to adopt Greg Ward's options parsing
> module, Optik.  I propose to adopt this under the name "options".  Any
> comments?
>

+0

The name is basically fine, if just a little vague.  But then again I
really doubt someone learning programming knows what getopt traditionally
means.

But I don't have a better name, so I can't really complain.  Best I can do
is ArgParser or something to try to tie the name into sys.argv.

And I completely support making sure that it doesn't have a cute name.

-Brett



From ping@zesty.ca  Wed Nov 13 21:33:03 2002
From: ping@zesty.ca (Ka-Ping Yee)
Date: Wed, 13 Nov 2002 15:33:03 -0600 (CST)
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211131640.gADGeRT29280@odiug.zope.com>
Message-ID: <Pine.LNX.4.33.0211131524040.23777-100000@server1.lfw.org>

On Wed, 13 Nov 2002, Guido van Rossum wrote:
> the guideline becomes "use short,
> lower-case module names".

A short lower-case name would be good, but i worry that "options" is
too generic a word.  There are all sorts of options it might mean.
Could we find a name that has something to do with commands or the
command line, like "cmdline" or "cmdopts"?


-- ?!ng



From guido@python.org  Wed Nov 13 21:36:24 2002
From: guido@python.org (Guido van Rossum)
Date: Wed, 13 Nov 2002 16:36:24 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: Your message of "Wed, 13 Nov 2002 15:33:03 CST."
 <Pine.LNX.4.33.0211131524040.23777-100000@server1.lfw.org>
References: <Pine.LNX.4.33.0211131524040.23777-100000@server1.lfw.org>
Message-ID: <200211132136.gADLaOd07157@odiug.zope.com>

> > the guideline becomes "use short,
> > lower-case module names".
> 
> A short lower-case name would be good, but i worry that "options" is
> too generic a word.  There are all sorts of options it might mean.
> Could we find a name that has something to do with commands or the
> command line, like "cmdline" or "cmdopts"?

This has been mentioned before and I'm sort of in agreement,
especially since I've heard from several people already who have
their own module options.py.

How about optlib?  It's short, un-cute, and follows the *lib pattern
used all over the Python stdlib.

--Guido van Rossum (home page: http://www.python.org/~guido/)


From dave@boost-consulting.com  Wed Nov 13 21:59:14 2002
From: dave@boost-consulting.com (David Abrahams)
Date: Wed, 13 Nov 2002 16:59:14 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <Pine.LNX.4.33.0211131524040.23777-100000@server1.lfw.org> (Ka-Ping
 Yee's message of "Wed, 13 Nov 2002 15:33:03 -0600 (CST)")
References: <Pine.LNX.4.33.0211131524040.23777-100000@server1.lfw.org>
Message-ID: <un0od3zd9.fsf@boost-consulting.com>

Ka-Ping Yee <ping@zesty.ca> writes:

> On Wed, 13 Nov 2002, Guido van Rossum wrote:
>> the guideline becomes "use short,
>> lower-case module names".
>
> A short lower-case name would be good, but i worry that "options" is
> too generic a word.  There are all sorts of options it might mean.
> Could we find a name that has something to do with commands or the
> command line, like "cmdline" or "cmdopts"?

+1

Both of those go "thunk" for me.

-- 
                       David Abrahams
   dave@boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution



From gward@python.net  Wed Nov 13 23:37:29 2002
From: gward@python.net (Greg Ward)
Date: Wed, 13 Nov 2002 18:37:29 -0500
Subject: [getopt-sig] Adopting Optik
In-Reply-To: <200211131554.gADFsBw28797@odiug.zope.com>
References: <200211131554.gADFsBw28797@odiug.zope.com>
Message-ID: <20021113233729.GA3218@cthulhu.gerg.ca>

On 13 November 2002, Guido van Rossum said:
> I want to start working on an alpha release of Python 2.3.  I'd like
> to be able to release 2.3a1 before Xmas.  PEP 283 has a list of things
> to be done.  One of the tasks is to adopt Greg Ward's options parsing
> module, Optik.  I propose to adopt this under the name "options".  Any
> comments?

I have yet to be thrilled by any of the proposed names, and I'm not
thrilled by this one.  It's possible that I dislike it slightly less
than OptionParser, which has been my working title for ages now.

BTW, several weeks ago I wrote a script to do much of the grunt work.
If you have the Optik CVS tree checked out, this:

  ./merge optik.py

will merge the relevant code from lib/*.py into optik.py.  Change the
output name to suit your taste, of course.

Still haven't done anything about the test suite, which is probably the
main reason I've been procrastinating on this.  (Oh yeah, the docs too.)

        Greg
-- 
Greg Ward <gward@python.net>                         http://www.gerg.ca/
Are we THERE yet?


From gward@python.net  Wed Nov 13 23:39:47 2002
From: gward@python.net (Greg Ward)
Date: Wed, 13 Nov 2002 18:39:47 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211132136.gADLaOd07157@odiug.zope.com>
References: <Pine.LNX.4.33.0211131524040.23777-100000@server1.lfw.org> <200211132136.gADLaOd07157@odiug.zope.com>
Message-ID: <20021113233947.GB3218@cthulhu.gerg.ca>

On 13 November 2002, Guido van Rossum said:
> How about optlib?  It's short, un-cute, and follows the *lib pattern
> used all over the Python stdlib.

Oooh, I think I like it!  Definitely more than I like cmdline.py or
cmdopts.py or anything like that.

(I dislike abbreviated words in module names almost as much as Guido
dislikes underscores.)

        Greg
-- 
Greg Ward <gward@python.net>                         http://www.gerg.ca/
And I wonder ... will Elvis take the place of Jesus in a thousand years?
    -- Dead Kennedys


From jeremy@alum.mit.edu  Wed Nov 13 23:39:46 2002
From: jeremy@alum.mit.edu (Jeremy Hylton)
Date: Wed, 13 Nov 2002 18:39:46 -0500
Subject: [Python-Dev] Re: [getopt-sig] Adopting Optik
In-Reply-To: <20021113233729.GA3218@cthulhu.gerg.ca>
References: <200211131554.gADFsBw28797@odiug.zope.com>
 <20021113233729.GA3218@cthulhu.gerg.ca>
Message-ID: <15826.58050.522774.15983@slothrop.zope.com>

>>>>> "GW" == Greg Ward <gward@python.net> writes:

  GW> Still haven't done anything about the test suite, which is
  GW> probably the main reason I've been procrastinating on this.  (Oh
  GW> yeah, the docs too.)

They can probably wait until the distutils docs are done.

Jeremy



From gward@python.net  Wed Nov 13 23:44:19 2002
From: gward@python.net (Greg Ward)
Date: Wed, 13 Nov 2002 18:44:19 -0500
Subject: [Python-Dev] Re: [getopt-sig] Adopting Optik
In-Reply-To: <15826.58050.522774.15983@slothrop.zope.com>
References: <200211131554.gADFsBw28797@odiug.zope.com> <20021113233729.GA3218@cthulhu.gerg.ca> <15826.58050.522774.15983@slothrop.zope.com>
Message-ID: <20021113234419.GC3218@cthulhu.gerg.ca>

On 13 November 2002, Jeremy Hylton said:
>   GW> Still haven't done anything about the test suite, which is
>   GW> probably the main reason I've been procrastinating on this.  (Oh
>   GW> yeah, the docs too.)
> 
> They can probably wait until the distutils docs are done.

Ouch!  That was low.  ;-)  BTW, Optik *is* copiously documented -- it's
just a question of LaTeX-ifying the docs.

        Greg
-- 
Greg Ward <gward@python.net>                         http://www.gerg.ca/
I'm a lumberjack and I'm OK / I sleep all night and I work all day


From dave@boost-consulting.com  Wed Nov 13 23:43:50 2002
From: dave@boost-consulting.com (David Abrahams)
Date: Wed, 13 Nov 2002 18:43:50 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <20021113233947.GB3218@cthulhu.gerg.ca> (Greg Ward's message of
 "Wed, 13 Nov 2002 18:39:47 -0500")
References: <Pine.LNX.4.33.0211131524040.23777-100000@server1.lfw.org>
 <200211132136.gADLaOd07157@odiug.zope.com>
 <20021113233947.GB3218@cthulhu.gerg.ca>
Message-ID: <ufzu52fyh.fsf@boost-consulting.com>

Greg Ward <gward@python.net> writes:

> On 13 November 2002, Guido van Rossum said:
>> How about optlib?  It's short, un-cute, and follows the *lib pattern
>> used all over the Python stdlib.
>
> Oooh, I think I like it!  Definitely more than I like cmdline.py or
> cmdopts.py or anything like that.
>
> (I dislike abbreviated words in module names almost as much as Guido
> dislikes underscores.)

<opinion>
I agree with that sentiment, but find it hard to understand why you'd
prefer 'opt' as an abbreviation over the other abbreviations
suggested, which are much less-confusable.
</opinion>

-- 
                       David Abrahams
   dave@boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution



From goodger@python.org  Thu Nov 14 01:58:50 2002
From: goodger@python.org (David Goodger)
Date: Wed, 13 Nov 2002 20:58:50 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211131640.gADGeRT29280@odiug.zope.com>
Message-ID: <B9F86D89.2BB6C%goodger@python.org>

Guido van Rossum wrote:
> I propose to adopt this under the name "options".  Any comments?

"optlib" is better.  I have no problem with "OptionParser" either; it
*is* longer, but matches the "ConfigParser" pattern.

>> Since some projects (for exmaple docutils) already started to use
>> Optik it is becoming increasingly late for a name change.
>
> The docutils author can speak for himself; I think docutils can deal
> with the change.

Docutils has no problem with the name change.  We've known for months
that it was imminent.

Projects that use Optik either ship with it included or require it to
be installed separately.  I believe Greg Ward plans to maintain an
independent distribution, using the old name, for the benefit of such
projects and for users of Python 2.0 through 2.2.

-- 
David Goodger  <goodger@python.org>  Open-source projects:
  - Python Docutils: http://docutils.sourceforge.net/
    (includes reStructuredText: http://docutils.sf.net/rst.html)
  - The Go Tools Project: http://gotools.sourceforge.net/



From guido@python.org  Thu Nov 14 04:07:12 2002
From: guido@python.org (Guido van Rossum)
Date: Wed, 13 Nov 2002 23:07:12 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: Your message of "Wed, 13 Nov 2002 20:58:50 EST."
 <B9F86D89.2BB6C%goodger@python.org>
References: <B9F86D89.2BB6C%goodger@python.org>
Message-ID: <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>

> Projects that use Optik either ship with it included or require it to
> be installed separately.  I believe Greg Ward plans to maintain an
> independent distribution, using the old name, for the benefit of such
> projects and for users of Python 2.0 through 2.2.

Of course, it would be easier for prospective users if Greg's
distribution used the same name as we adopt for 2.3. :-)

Of all the names suggested so far, I like optlib and argvparse equally
well.  Can we do a tally of votes for those, to decide?

--Guido van Rossum (home page: http://www.python.org/~guido/)


From dave@boost-consulting.com  Thu Nov 14 04:02:10 2002
From: dave@boost-consulting.com (David Abrahams)
Date: Wed, 13 Nov 2002 23:02:10 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net> (Guido
 van Rossum's message of "Wed, 13 Nov 2002 23:07:12 -0500")
References: <B9F86D89.2BB6C%goodger@python.org>
 <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
Message-ID: <uy97wztml.fsf@boost-consulting.com>

Guido van Rossum <guido@python.org> writes:

> Of all the names suggested so far, I like optlib and argvparse equally
> well.  Can we do a tally of votes for those, to decide?

+1 on argvparse
-1 on optlib (sounds like optimization)

-- 
                       David Abrahams
   dave@boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution



From aahz@pythoncraft.com  Thu Nov 14 05:38:12 2002
From: aahz@pythoncraft.com (Aahz)
Date: Thu, 14 Nov 2002 00:38:12 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
References: <B9F86D89.2BB6C%goodger@python.org> <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
Message-ID: <20021114053812.GA8827@panix.com>

On Wed, Nov 13, 2002, Guido van Rossum wrote:
> 
> Of all the names suggested so far, I like optlib and argvparse equally
> well.  Can we do a tally of votes for those, to decide?

If those are the options:

+1 argvparse
-0 optlib

If it were optionlib, I'd change to +0 or +1.
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

A: No.
Q: Is top-posting okay?


From ping@zesty.ca  Thu Nov 14 05:38:16 2002
From: ping@zesty.ca (Ka-Ping Yee)
Date: Wed, 13 Nov 2002 23:38:16 -0600 (CST)
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
Message-ID: <Pine.LNX.4.33.0211132336400.15918-100000@server1.lfw.org>

On Wed, 13 Nov 2002, Guido van Rossum wrote:
> Of all the names suggested so far, I like optlib and argvparse equally
> well.  Can we do a tally of votes for those, to decide?

I find "argvparse" more meaningful.  (Although "optlib" is slightly less
generic than "options", the "lib" suffix doesn't really mean anything
to me.  Side question: does the presence or absence of "-lib" have any
conventional mening?)


-- ?!ng



From goodger@python.org  Thu Nov 14 05:46:09 2002
From: goodger@python.org (David Goodger)
Date: Thu, 14 Nov 2002 00:46:09 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
Message-ID: <B9F8A2D0.2BB8B%goodger@python.org>

Guido van Rossum wrote:
> Of all the names suggested so far, I like optlib and argvparse equally
> well.  Can we do a tally of votes for those, to decide?

optlib > argvparse

To me, "argvparse" is a bit misleading.  Docutils is not only using Optik
for command-line option parsing, but also for all runtime settings handling,
even when executed programmatically (i.e., no command-line options to
parse).  I originally named the optik.Values object "options", but recently
changed it to "settings" to better reflect its true nature.  Optik also
interfaces well with config files via ConfigParser.

Using Optik with ConfigParser and the runtime settings specs from each of
Docutils' components feels just like applying a design pattern: it works, it
clicks, it feels *right*.  Not sure if it's an existing pattern or a new one
though.

-- 
David Goodger  <goodger@python.org>  Open-source projects:
  - Python Docutils: http://docutils.sourceforge.net/
    (includes reStructuredText: http://docutils.sf.net/rst.html)
  - The Go Tools Project: http://gotools.sourceforge.net/



From barry@python.org  Thu Nov 14 05:55:09 2002
From: barry@python.org (Barry A. Warsaw)
Date: Thu, 14 Nov 2002 00:55:09 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
References: <B9F86D89.2BB6C%goodger@python.org>
 <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
Message-ID: <15827.15037.983947.72530@gargle.gargle.HOWL>

>>>>> "GvR" == Guido van Rossum <guido@python.org> writes:

    GvR> Of all the names suggested so far, I like optlib and
    GvR> argvparse equally well.  Can we do a tally of votes for
    GvR> those, to decide?

+1 argvparse
+0 optlib

-Barry


From DavidA@ActiveState.com  Thu Nov 14 06:18:57 2002
From: DavidA@ActiveState.com (David Ascher)
Date: Wed, 13 Nov 2002 22:18:57 -0800
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
References: <B9F86D89.2BB6C%goodger@python.org>	<200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net> <uy97wztml.fsf@boost-consulting.com>
Message-ID: <3DD34051.2070909@ActiveState.com>

David Abrahams wrote:

>-1 on optlib (sounds like optimization)
>
Agreed, especially with the parenthetical comment.

I don't like argvparse much because this "argv" thing is far from 
obvious to newbies.  But given those two choices, I'd pick argvparse 
over optlib.




From guido@python.org  Thu Nov 14 13:15:38 2002
From: guido@python.org (Guido van Rossum)
Date: Thu, 14 Nov 2002 08:15:38 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: Your message of "Thu, 14 Nov 2002 09:22:03 GMT."
 <16E1010E4581B049ABC51D4975CEDB885E2DC4@UKDCX001.uk.int.atosorigin.com>
References: <16E1010E4581B049ABC51D4975CEDB885E2DC4@UKDCX001.uk.int.atosorigin.com>
Message-ID: <200211141315.gAEDFch29632@pcp02138704pcs.reston01.va.comcast.net>

In the choice between optlib and argvparse, argvparse wins by a
landslide.  But I came up with a better one: optparse!  This addresses
the argument by several Davids that argv is obscure to newbies.  I
think it doesn't sound like optimization like optlib does.

optparse also seems to be what Ruby uses (it even has an OptionParser
class :-), and I found an optparse.tcl on the net too.

I also note that the recommended rhythm looks better as

  from optparse import OptionParser

than as

  from argvparse import OptionParser

--Guido van Rossum (home page: http://www.python.org/~guido/)


From pobrien@orbtech.com  Thu Nov 14 14:21:04 2002
From: pobrien@orbtech.com (Patrick K. O'Brien)
Date: Thu, 14 Nov 2002 08:21:04 -0600
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <3DD34051.2070909@ActiveState.com>
References: <B9F86D89.2BB6C%goodger@python.org> <uy97wztml.fsf@boost-consulting.com> <3DD34051.2070909@ActiveState.com>
Message-ID: <200211140821.04628.pobrien@orbtech.com>

On Thursday 14 November 2002 12:18 am, David Ascher wrote:
> I don't like argvparse much because this "argv" thing is far from
> obvious to newbies.  But given those two choices, I'd pick argvparse
> over optlib.

I agree that "argv" isn't obvious, but we're likely stuck with it. Given 
that, along with David Goodger's observation that Optik does more than 
parse, I thought I'd throw this name into the fray:

argvlib

If that doesn't sit well with anyone, I'm +1 on argvparse.

-- 
Patrick K. O'Brien
Orbtech      http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------



From mclay@nist.gov  Thu Nov 14 15:38:29 2002
From: mclay@nist.gov (Michael McLay)
Date: Thu, 14 Nov 2002 10:38:29 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <3DD34051.2070909@ActiveState.com>
References: <B9F86D89.2BB6C%goodger@python.org> <uy97wztml.fsf@boost-consulting.com> <3DD34051.2070909@ActiveState.com>
Message-ID: <200211141038.29309.mclay@nist.gov>

On Thursday 14 November 2002 01:18 am, David Ascher wrote:
> David Abrahams wrote:
> >-1 on optlib (sounds like optimization)
>
> Agreed, especially with the parenthetical comment.
>
> I don't like argvparse much because this "argv" thing is far from
> obvious to newbies.  But given those two choices, I'd pick argvparse
> over optlib.

I was just about to say the same thing about "argv".  

How about calling it cmdoptionslib or optionslib. 

For a newbie just using the word "options" makes it diffcult to locate 
references using google, etc. On google optionlib had three pages of hits, 
optionslib had two hits and cmdoptionslib had no hits.




From pinard@iro.umontreal.ca  Thu Nov 14 17:40:29 2002
From: pinard@iro.umontreal.ca (=?iso-8859-1?q?Fran=E7ois?= Pinard)
Date: 14 Nov 2002 12:40:29 -0500
Subject: [getopt-sig] Re: Adopting Optik
In-Reply-To: <200211131554.gADFsBw28797@odiug.zope.com>
References: <200211131554.gADFsBw28797@odiug.zope.com>
Message-ID: <oqy97wm4mq.fsf@titan.progiciels-bpi.ca>

[Guido van Rossum]

> [...] One of the tasks is to adopt Greg Ward's options parsing module,
> Optik.  I propose to adopt this under the name "options".  Any comments?

My feeling is that Python should much avoid, for a library module, a name
which is likely to be a user variable name.  This would rule out "options".

In my experience so far, the most irritating cases in Python hurding common
words for itself have been `string' and `socket'.  I know that some people
write `s' for a string and would write `o' for options, but this algebraic
style is not ideal.  I find that using real words, like `counter',
`ordinal', `cursor', `index' or such, yields more readable programs.

When one "imports" a module, one has to give up using the module name for
other purposes.  Currently, I think _all_ my callable scripts which handle
options already use `options' for a variable name, so I would prefer that
`options' be left alone.

This is why I think Python should not offer a module named "text" for
example.  As a principle for the future, let simple, common words be
available to users for naming their own variables.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard


From pinard@iro.umontreal.ca  Thu Nov 14 17:55:19 2002
From: pinard@iro.umontreal.ca (=?iso-8859-1?q?Fran=E7ois?= Pinard)
Date: 14 Nov 2002 12:55:19 -0500
Subject: [getopt-sig] Re: Adopting Optik
In-Reply-To: <200211131554.gADFsBw28797@odiug.zope.com>
References: <200211131554.gADFsBw28797@odiug.zope.com>
Message-ID: <oqu1ikm3y0.fsf@titan.progiciels-bpi.ca>

[Guido van Rossum]

> [...] One of the tasks is to adopt Greg Ward's options parsing module,
> Optik.  I propose to adopt this under the name "options".  Any comments?

For what it might be worth, from all suggestions I've seen so far,
"OptionParser" is the one I like best, because of the pre-existence of
"ConfigParser", and the similarity between goals and complexity level.
I understand that OptionParser is _also_ a class among others in those
offered, and some of us do not see a reason to _give preference_ to one
particular class.  I would rather the module name also being one of its
class name as a mere coincidence or accident, rather than the indication
that some preference was given.  The objection against it is not strong.

In a previous message, I told why "options" looks a bad choice to me.
The next worse is probably "optlib", because its ambiguity makes it
pretty meaningless.  Maybe that "Optik" could be retained as yet another
possibility?  It might not be so bad, all considered. ;-)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard


From aahz@pythoncraft.com  Thu Nov 14 19:03:39 2002
From: aahz@pythoncraft.com (Aahz)
Date: Thu, 14 Nov 2002 14:03:39 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211141315.gAEDFch29632@pcp02138704pcs.reston01.va.comcast.net>
References: <16E1010E4581B049ABC51D4975CEDB885E2DC4@UKDCX001.uk.int.atosorigin.com> <200211141315.gAEDFch29632@pcp02138704pcs.reston01.va.comcast.net>
Message-ID: <20021114190339.GA7387@panix.com>

On Thu, Nov 14, 2002, Guido van Rossum wrote:
>
> In the choice between optlib and argvparse, argvparse wins by a
> landslide.  But I came up with a better one: optparse!  This addresses
> the argument by several Davids that argv is obscure to newbies.  I
> think it doesn't sound like optimization like optlib does.
> 
> optparse also seems to be what Ruby uses (it even has an OptionParser
> class :-), and I found an optparse.tcl on the net too.

+1
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

A: No.
Q: Is top-posting okay?


From mgilfix@eecs.tufts.edu  Thu Nov 14 20:00:36 2002
From: mgilfix@eecs.tufts.edu (Michael Gilfix)
Date: Thu, 14 Nov 2002 15:00:36 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
References: <B9F86D89.2BB6C%goodger@python.org> <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
Message-ID: <20021114200036.GB199@eecs.tufts.edu>

On Wed, Nov 13 @ 23:07, Guido van Rossum wrote:
> Of course, it would be easier for prospective users if Greg's
> distribution used the same name as we adopt for 2.3. :-)
> 
> Of all the names suggested so far, I like optlib and argvparse equally
> well.  Can we do a tally of votes for those, to decide?

+1 optlib
-1 argvparse (ugh)

-- 
Michael Gilfix
mgilfix@eecs.tufts.edu

For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html


From mgilfix@eecs.tufts.edu  Thu Nov 14 20:08:15 2002
From: mgilfix@eecs.tufts.edu (Michael Gilfix)
Date: Thu, 14 Nov 2002 15:08:15 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211141038.29309.mclay@nist.gov>
References: <B9F86D89.2BB6C%goodger@python.org> <uy97wztml.fsf@boost-consulting.com> <3DD34051.2070909@ActiveState.com> <200211141038.29309.mclay@nist.gov>
Message-ID: <20021114200814.GC199@eecs.tufts.edu>

  After reading this thread, it seems kind of shame we can't do
something like:

  from parselib import OptionParser

  which could match with UrlParser and ConfigParser. But, that being
said, I like either Guido's "optparse" or the OptionParser name in the
end.

                     -- Mike

On Thu, Nov 14 @ 10:38, Michael McLay wrote:
> On Thursday 14 November 2002 01:18 am, David Ascher wrote:
> > David Abrahams wrote:
> > >-1 on optlib (sounds like optimization)
> >
> > Agreed, especially with the parenthetical comment.
> >
> > I don't like argvparse much because this "argv" thing is far from
> > obvious to newbies.  But given those two choices, I'd pick argvparse
> > over optlib.
> 
> I was just about to say the same thing about "argv".  
> 
> How about calling it cmdoptionslib or optionslib. 
> 
> For a newbie just using the word "options" makes it diffcult to locate 
> references using google, etc. On google optionlib had three pages of hits, 
> optionslib had two hits and cmdoptionslib had no hits.
> 
> 
> 
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev

-- 
Michael Gilfix
mgilfix@eecs.tufts.edu

For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html


From guido@python.org  Thu Nov 14 20:54:46 2002
From: guido@python.org (Guido van Rossum)
Date: Thu, 14 Nov 2002 15:54:46 -0500
Subject: [Python-Dev] Re: [getopt-sig] Adopting Optik
In-Reply-To: Your message of "Wed, 13 Nov 2002 18:37:29 EST."
 <20021113233729.GA3218@cthulhu.gerg.ca>
References: <200211131554.gADFsBw28797@odiug.zope.com>
 <20021113233729.GA3218@cthulhu.gerg.ca>
Message-ID: <200211142054.gAEKskw12698@odiug.zope.com>

Let's assume we'll stick with optparse as the module name.  There are
still a few references to Optik in the source code, in particular
there's an exception class OptikError.  (The other mentions are in
comments.)

Should I rename OptikError to OptParseError, or leave it?

--Guido van Rossum (home page: http://www.python.org/~guido/)


From ping@zesty.ca  Thu Nov 14 21:02:17 2002
From: ping@zesty.ca (Ka-Ping Yee)
Date: Thu, 14 Nov 2002 15:02:17 -0600 (CST)
Subject: [Python-Dev] Re: [getopt-sig] Adopting Optik
In-Reply-To: <200211142054.gAEKskw12698@odiug.zope.com>
Message-ID: <Pine.LNX.4.33.0211141501420.13293-100000@server1.lfw.org>

On Thu, 14 Nov 2002, Guido van Rossum wrote:
> Should I rename OptikError to OptParseError, or leave it?

I like optparse, and i think it's a good idea to call the corresponding
error OptParseError.


-- ?!ng



From DavidA@ActiveState.com  Thu Nov 14 21:22:46 2002
From: DavidA@ActiveState.com (David Ascher)
Date: Thu, 14 Nov 2002 13:22:46 -0800
Subject: [Python-Dev] Re: [getopt-sig] Adopting Optik
In-Reply-To: <Pine.LNX.4.33.0211141501420.13293-100000@server1.lfw.org>
References: <Pine.LNX.4.33.0211141501420.13293-100000@server1.lfw.org>
Message-ID: <3DD41426.7070806@ActiveState.com>

Ka-Ping Yee wrote:

> On Thu, 14 Nov 2002, Guido van Rossum wrote:
>
> >Should I rename OptikError to OptParseError, or leave it?
>
>
> I like optparse, and i think it's a good idea to call the corresponding
> error OptParseError.

Agreed.  Now's the time to get rid of the legacy code.








From Jack.Jansen@oratrix.com  Thu Nov 14 21:38:54 2002
From: Jack.Jansen@oratrix.com (Jack Jansen)
Date: Thu, 14 Nov 2002 22:38:54 +0100
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211132136.gADLaOd07157@odiug.zope.com>
Message-ID: <78E5B125-F819-11D6-B877-000A27B19B96@oratrix.com>

On woensdag, nov 13, 2002, at 22:36 Europe/Amsterdam, Guido van Rossum 
wrote:
> How about optlib?  It's short, un-cute, and follows the *lib pattern
> used all over the Python stdlib.

optlib may be a bit better than options, but it could still do many 
different things in my mind. Maybe argvlib (which is most definitely 
un-cute:-)?
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -



From gward@python.net  Thu Nov 14 21:40:00 2002
From: gward@python.net (Greg Ward)
Date: Thu, 14 Nov 2002 16:40:00 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
References: <B9F86D89.2BB6C%goodger@python.org> <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
Message-ID: <20021114214000.GB4989@cthulhu.gerg.ca>

On 13 November 2002, Guido van Rossum said:
> Of course, it would be easier for prospective users if Greg's
> distribution used the same name as we adopt for 2.3. :-)

Yes -- what I'm planning is the first major Optik release after it's
incorporated into Python's stdlib (Optik 1.5?) will include a stub
module -- optlib.py, optparse.py, OptionParser.py, whatever -- that
emulates the module of the same name from Python 2.3.  Or something like
that.  So developers can say "requires Python 2.3 or Optik 1.5" and just
code this:

  from optparse import OptionParser

with no silly "try/except ImportError" hacks.

        Greg
-- 
Greg Ward <gward@python.net>                         http://www.gerg.ca/
It takes a scary kind of illness / To design a place like this for pay
Downtown's an endless generic mall / Of video games and fast food chains
    -- Dead Kennedys


From gward@python.net  Thu Nov 14 21:42:04 2002
From: gward@python.net (Greg Ward)
Date: Thu, 14 Nov 2002 16:42:04 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
References: <B9F86D89.2BB6C%goodger@python.org> <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
Message-ID: <20021114214204.GC4989@cthulhu.gerg.ca>

On 13 November 2002, Guido van Rossum said:
> Of all the names suggested so far, I like optlib and argvparse equally
> well.  Can we do a tally of votes for those, to decide?

'argvparse' turns my stomach.

'optlib' I like.

'optparse' I like even more.

I guess I am being hypocritical wrt. abbreviations in identifier names.
Oh well.

        Greg
-- 
Greg Ward <gward@python.net>                         http://www.gerg.ca/
MTV -- get off the air!
    -- Dead Kennedys


From DavidA@ActiveState.com  Thu Nov 14 21:47:17 2002
From: DavidA@ActiveState.com (David Ascher)
Date: Thu, 14 Nov 2002 13:47:17 -0800
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <B9F86D89.2BB6C%goodger@python.org>
References: <B9F86D89.2BB6C%goodger@python.org> <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net> <20021114214204.GC4989@cthulhu.gerg.ca>
Message-ID: <3DD419E5.3060805@ActiveState.com>

Greg Ward wrote:

> 'optparse' I like even more.
>
I have no problem w/ optparse.



From drifty@bigfoot.com  Thu Nov 14 21:52:15 2002
From: drifty@bigfoot.com (Brett Cannon)
Date: Thu, 14 Nov 2002 13:52:15 -0800 (PST)
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
Message-ID: <Pine.SOL.4.44.0211141330400.9191-100000@death.OCF.Berkeley.EDU>

[Guido van Rossum]

> Of all the names suggested so far, I like optlib and argvparse equally
> well.  Can we do a tally of votes for those, to decide?
>

+1 argvparse
-0 optlib

And to just continue with what I had done before, here is the current
tally for votes for the two options (based on direct replies to Guido's
email calling for this vote except for Raymond's)::

argvparse:
	+1 : (David Abrahams, Brett Cannon, Barry Warsaw, Patrick O'Brien)
	+0 : ()
	-0 : ()
	-1 : (Michael Gilfix)

optlib:
	+1 : (Michael Gilfix, Raymond Hettinger)
	+0 : (Barry Warsaw)
	-0 : (Brett Cannon)
	-1 : (David Abrahams, David Ascher)

Vague votes:
	Ka-Ping Yee (likes argvparse)
	David Goodger ("optlib > argvparse")
	David Ascher ("I'd pick argvparse over optlib")
	Greg Ward ("argvparse turns my stomach; optlib I like")

Notes:
	David Abrahams would change his vote for ``optlib`` if the name
was ``optionslib``.  Michael Lay likes this name, too.
	Patrick O'Brien's vote is only if argvlib doesn't go anywhere.


OptionParser, optparse, and argvlib were the wild card names mentioned the
most.  People also warmed to ``optionslib`` more than ``optlib`` and
seemed willing to change there vote if ``optlib`` metamorphosed.

-Brett

P.S.: Guido, if you call another vote with different names for some
reason, can you change the subject line of the email so that Mailman makes
all the votes a single thread?  Makes it easier for me to count (assuming
you want me to keep bothering to count).



From Jack.Jansen@oratrix.com  Thu Nov 14 21:59:24 2002
From: Jack.Jansen@oratrix.com (Jack Jansen)
Date: Thu, 14 Nov 2002 22:59:24 +0100
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <78E5B125-F819-11D6-B877-000A27B19B96@oratrix.com>
Message-ID: <566D7E3C-F81C-11D6-B877-000A27B19B96@oratrix.com>

On donderdag, nov 14, 2002, at 22:38 Europe/Amsterdam, Jack Jansen 
wrote:
> optlib may be a bit better than options, but it could still do many 
> different things in my mind. Maybe argvlib (which is most definitely 
> un-cute:-)?

Sorry, ignore this message. I wrote it yesterday but it somehow didnt 
get out of my machine until just yet. I'm all for argvparse at the 
moment. Incidentally, I think that the fact that argv is unclear to 
newbees is too bad, as they'll have to learn about sys.argv anyway...
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -



From guido@python.org  Thu Nov 14 22:01:44 2002
From: guido@python.org (Guido van Rossum)
Date: Thu, 14 Nov 2002 17:01:44 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: Your message of "Thu, 14 Nov 2002 13:52:15 PST."
 <Pine.SOL.4.44.0211141330400.9191-100000@death.OCF.Berkeley.EDU>
References: <Pine.SOL.4.44.0211141330400.9191-100000@death.OCF.Berkeley.EDU>
Message-ID: <200211142201.gAEM1i713141@odiug.zope.com>

> P.S.: Guido, if you call another vote with different names for some
> reason, can you change the subject line of the email so that Mailman
> makes all the votes a single thread?  Makes it easier for me to
> count (assuming you want me to keep bothering to count).

No, thanks!  optparse wins hands down in the latest exit poll.  I've
checked it in (docs and unit tests still missing though).

--Guido van Rossum (home page: http://www.python.org/~guido/)


From dave@boost-consulting.com  Thu Nov 14 22:39:05 2002
From: dave@boost-consulting.com (David Abrahams)
Date: Thu, 14 Nov 2002 17:39:05 -0500
Subject: [getopt-sig] Re: [Python-Dev] Adopting Optik
In-Reply-To: <3DD419E5.3060805@ActiveState.com> (David Ascher's message of
 "Thu, 14 Nov 2002 13:47:17 -0800")
References: <B9F86D89.2BB6C%goodger@python.org>
 <200211140407.gAE47CU21510@pcp02138704pcs.reston01.va.comcast.net>
 <20021114214204.GC4989@cthulhu.gerg.ca>
 <3DD419E5.3060805@ActiveState.com>
Message-ID: <u8yzvrd2u.fsf@boost-consulting.com>

David Ascher <DavidA@ActiveState.com> writes:

> Greg Ward wrote:
>
>> 'optparse' I like even more.
>>
> I have no problem w/ optparse.

Me neither. 

Optimal parsing? I doubt many will read it that way ;-)
-- 
                       David Abrahams
   dave@boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution