On 1/2/19 7:12 PM, Alan So wrote:
Sorry for my ignorance. May I know what should be imported before using mailman shell within Python?
$ python3.6 Python 3.6.6 (default, Aug 13 2018, 18:24:23) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux Type "help", "copyright", "credits" or "license" for more information.
command = cli('mailman.commands.cli_withlist.shell') Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'cli' is not defined
Link to documentation: https://mailman.readthedocs.io/en/latest/src/mailman/commands/docs/shell.htm...
That's too complicated. Just run
mailman shell
as a command. If you want to operate on a single list, run
mailman shell -l <list_id>
Also see
mailman shell --details
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan