On Nov 9, 2004, at 02:15, G James Jones wrote:

Recently I got a request to remove the owner of a couple of our lists.

I know that I can do this from the web, but is there a way to remove
list owners from the command line?

You can use bin/withlist to manipulate the mailing list object. Use the command line option to lock the list, use standard Python syntax to modify the object to suit (getting clues about variable names from the web interface and Defaults.py), and then Save() the modified object. (Making backup copies of the list object before making modifications is always a good idea.)


The 'owner' variable is a list of strings.

$ bin/withlist -l mylist
>>> print m.owner
['[EMAIL PROTECTED]', '[EMAIL PROTECTED]']
>>> del m.owner[m.owner.index('[EMAIL PROTECTED]')]
>>> print m.owner
['[EMAIL PROTECTED]']
>>> m.owner.insert(0, '[EMAIL PROTECTED]')
>>> print m.owner
['[EMAIL PROTECTED]', '[EMAIL PROTECTED]']
>>> m.Save()
>>> {ctrl-D}

Run 'bin/withlist --h' for a description of how you can use the -r switch to make that into a command line script you can call with withlist. (There are many examples in the mailman-users archives.)

You can also use bin/config_list (check both the -i and -o switches) to get human readable/editable information, rather than bin/withlist's more "programatic" style.

--
Jim Tittsler             http://www.OnJapan.net/      GPG: 0x01159DB6
Python Starship          http://Starship.Python.net/
Ringo MUG Tokyo          http://www.ringo.net/rss.html

------------------------------------------------------
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

Reply via email to