On 6/10/19 6:21 PM, andrew.bernard@gmail.com wrote:
is there a tutorial or some examples for using the mailman shell? Is there detailed documentation on it?
What documentation there is is at <https://mailman.readthedocs.io/en/latest/src/mailman/commands/docs/shell.html>
Anything I try to do such as the following fails:
$ mailman shell Welcome to the GNU Mailman shell
command('mailman shell --details') Traceback (most recent call last): File "<console>", line 1, in <module> NameError: name 'command' is not defined
You could just do mailman shell --details
at a command prompt.
Perhaps you saw the command('mailman shell --details')
line in the
docs at
<https://mailman.readthedocs.io/en/latest/src/mailman/commands/docs/shell.html#getting-detailed-help>
in any case, that requires two things to precede it. The first is part
of the doctest infrastructure and is not evident in the docs. that step is
from mailman.testing.documentation import cli
The second step is in the docs and is
command = cli('mailman.commands.cli_withlist.shell')
If you do those two steps within mailman shell
, then the step
command('mailman shell --details')
will work, but as I said, this is just the same as doing mailman shell --details
at a command prompt.
Beyond that, actually doing stuff within mailman shell
requires some
knowledge of Mailman interfaces, methods and objects as well as Python.
Some of this is covered throughout the documentation at
<https://mailman.readthedocs.io/en/latest/> but some can only be found
in the source code itself.
That said, all the interfaces and a few other useful functions are
imported for you in mailman shell
interactive mode. do dir()
to see
what these are.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan