On 07/20/2017 02:26 PM, Mark Sapiro wrote: > > The first thing I notice right away is the help text doesn't fill. E.g., > >> $ ./mailman --help >> Usage: mailman [OPTIONS] COMMAND [ARGS]... >> >> The GNU Mailman mailing list management system Copyright 1998-2017 by the >> Free Software Foundation, Inc. http://www.list.org >> >> Options: >> -C, --config PATH Configuration file to use. If not given, the >> environment >> variable >> MAILMAN_CONFIG_FILE is consulted and used if >> set. If neither are given, a >> default configuration file >> is loaded. >> --version Show the version and exit. >> --help Show this message and exit. ...
I've looked at the click docs and I see that text from docstrings is wrapped and filled as is the text > """\ > The GNU Mailman mailing list management system > Copyright 1998-2017 by the Free Software Foundation, Inc. > http://www.list.org > """ which wraps and fills as above, nd there is even a control to turn that off paragraph by paragraph, but the 'help=' text for an option doesn't seem to be handled that way. A possible workaround is to replace things like > help=_("""\ > Configuration file to use. If not given, the environment variable > MAILMAN_CONFIG_FILE is consulted and used if set. If neither are given, a > default configuration file is loaded.""")) with > help=_( > 'Configuration file to use. If not given, the environment variable ' > 'MAILMAN_CONFIG_FILE is consulted and used if set. If neither are given, > ' > 'a default configuration file is loaded.')) This seems to work to produce > Usage: mailman [OPTIONS] COMMAND [ARGS]... > > The GNU Mailman mailing list management system Copyright 1998-2017 by the > Free Software Foundation, Inc. http://www.list.org > > Options: > -C, --config PATH Configuration file to use. If not given, the environment > variable MAILMAN_CONFIG_FILE is consulted and used if > set. If neither are given, a default configuration file > is loaded. > --version Show the version and exit. > --help Show this message and exit. > -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org https://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9