From: Stefan Behnel on
Paul Rubin, 02.06.2010 10:43:
> Tim Golden writes:
>> pattern, which provides a minimally semi-self-documenting
>> approach for positional args, but I've always found the existing
>> offerings just a little too much work to bother with.
>> I'll give plac a run and see how it behaves.
>
> After using optparse a couple of times I got the hang of it. Maybe its
> docs could be organized a bit better, but it does the obvious things
> conveniently once you've figured it out a bit.

Same from here. I managed to talk a Java-drilled collegue of mine into
writing a Python script for a little command line utility, but he needed a
way to organise his argument extraction code when the number of arguments
started to grow beyond two. I told him that there were two ways to do it:
do it by hand or do it right. He took the right choice and I took him to
the optparse docs, copied the first example into his code and we adapted it
a little. He just loved the beauty of it.

Stefan

From: Michele Simionato on
On Jun 2, 11:01 am, Stefan Behnel <stefan...(a)behnel.de> wrote:
> I managed to talk a Java-drilled collegue of mine into
> writing a Python script for a little command line utility, but he needed a
> way to organise his argument extraction code when the number of arguments
> started to grow beyond two. I told him that there were two ways to do it:
> do it by hand or do it right. He took the right choice and I took him to
> the optparse docs, copied the first example into his code and we adapted it
> a little. He just loved the beauty of it.

Could you show plac to your friend? I would be curious to know what he
think.
Perhaps he would call out his judgment on optparse ;)

From: Michele Simionato on
On Jun 2, 6:37 am, Michele Simionato <michele.simion...(a)gmail.com>
wrote:
> With blatant immodesty, plac claims to be the easiest to use command
> line arguments parser module in the Python world

It seems I have to take that claim back. A few hours after the
announce I was pointed out to http://pypi.python.org/pypi/CLIArgs
which, I must concede, is even easier to use than plac. It seems
everybody has written its own command line arguments parser!
From: alex23 on
Michele Simionato <michele.simion...(a)gmail.com> wrote:
> It seems I have to take that claim back. A few hours after the
> announce I was pointed out tohttp://pypi.python.org/pypi/CLIArgs
> which, I must concede, is even easier to use than plac. It seems
> everybody has written its own command line arguments parser!

I think I still find opterator[1] to be simpler and clearer. No magic
global variables, no spooky behaviour with the main function, just a
decorator and docstring.

1: http://github.com/buchuki/opterator
From: Michele Simionato on
On Jun 2, 6:37 am, Michele Simionato <michele.simion...(a)gmail.com>
wrote:
> I would like to announce to the world the first public release of
> plac:
>
>  http://pypi.python.org/pypi/plac

The second release is out. I have added the recognition of keyword
arguments, improved the formatting of the help message, and added many
tests.