Poll about -h,--help options
Hi, Is it interesting to know if people expect -h to work as a --help equivalent by default? As it directly affects best practices of using Python in command line, can we run such poll on python.org? I thought that this stuff is obvious, but it appears that it is not, so I'd like to see this usability study - it will be interesting for the Python community to know itself better. -- anatoly t.
On Mon, Feb 18, 2013 at 9:40 AM, anatoly techtonik <techtonik@gmail.com>wrote:
Hi,
Is it interesting to know if people expect -h to work as a --help equivalent by default?
As it directly affects best practices of using Python in command line, can we run such poll on python.org? I thought that this stuff is obvious, but it appears that it is not, so I'd like to see this usability study - it will be interesting for the Python community to know itself better. -- anatoly t.
I hate typing "-h" only to find that just "--help" works. I'm pretty sure it's obvious and standard. http://en.wikipedia.org/wiki/Command-line_interface#Built-in_usage_help Yuval Greenfield
On Mon, Feb 18, 2013 at 11:39 AM, Steven D'Aprano <steve@pearwood.info>wrote:
On 18/02/13 18:40, anatoly techtonik wrote:
Hi,
Is it interesting to know if people expect -h to work as a --help equivalent by default?
Yes, absolutely.
Which reminds me of the most annoying behavior in existence: user@pc:~$ ln -h ln: invalid option -- 'h' Try `ln --help' for more information. user@pc:~$ Yuval
On Sun, Feb 17, 2013 at 11:40 PM, anatoly techtonik <techtonik@gmail.com> wrote:
Hi,
Is it interesting to know if people expect -h to work as a --help equivalent by default?
As it directly affects best practices of using Python in command line, can we run such poll on python.org? I thought that this stuff is obvious, but it appears that it is not, so I'd like to see this usability study - it will be interesting for the Python community to know itself better.
The argparse and optparse modules in the standard library expose help via both -h and --help by default (and this is in the Python documentation and in the help strings generated by those modules), so I would expect Python users at least to be familiar with both invocations: http://docs.python.org/2/library/optparse.html#generating-help http://docs.python.org/2/library/argparse.html#add-help --Chris
-- anatoly t.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org http://mail.python.org/mailman/listinfo/python-ideas
On 18.02.13 08:40, Anatoly Techtonik wrote:
...Is it interesting to know if people expect -h to work as a --help equivalent by default?
As it directly affects best practices of using Python in command line, can we run such poll on python.org <http://python.org>? I thought that this stuff is obvious, but it appears that it is not, so I'd like to see this usability study - it will be interesting for the Python community to know itself better. ...
Polls are funny. Why not :-? In the gnu world (at least) appending " -h" MAY for some tools result in output transformed to "human-readable", ie. tools like ls, du or df all support the -h triggers meaning "human readable" output options. Asking for help or versions seems to be not a global priority ;-) All the best, Stefan.
On 2/18/2013 2:40 AM, anatoly techtonik wrote:
Is it interesting to know if people expect -h to work as a --help equivalent by default?
Of course. Given that it already does for python itself " -? -h --help Print a short description of all command line options. " and at least some of its modules with a command line interface, I am not sure what you are getting at. If some python module is deficient, report it on the tracker. If you think the opt/argparse docs should say more than they do, make a suggestion here, but be prepared to accept a decision to not add anything, on the basis that it is mostly our policy to not tell people how to use Python. (PEP 8 is a style guide for the stdlib, and for other stuff only as people decide to use it.)
As it directly affects best practices of using Python in command line, can we run such poll on python.org <http://python.org>? I thought that this stuff is obvious, but it appears that it is not,
I have no idea what you are referring to, but if some other software is deficient, take it up with the authors. -- Terry Jan Reedy
anatoly techtonik <techtonik@gmail.com> writes:
Is it interesting to know if people expect -h to work as a --help equivalent by default?
There are too many existing tools that make use of ‘-h’ for other things (e.g. “hostname to connect to”) for me to expect it to mean “help” by default. If I'm expecting an option to be a short name for “help”, it would be ‘-?’. -- \ “One bad programmer can easily create two new jobs a year. | `\ Hiring more bad programmers will just increase our perceived | _o__) need for them.” —David Lorge Parnas, 1999-03 | Ben Finney
participants (7)
-
anatoly techtonik
-
Ben Finney
-
Chris Jerdonek
-
Stefan Drees
-
Steven D'Aprano
-
Terry Reedy
-
Yuval Greenfield