[ mailman-Feature Requests-1577361 ] Need simple mailman python module

SourceForge.net noreply at sourceforge.net
Sun Oct 15 00:47:30 CEST 2006

Feature Requests item #1577361, was opened at 2006-10-14 15:25
Message generated for change (Comment added) made by fmouse
You can respond by visiting: 

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Deleted
Resolution: None
Priority: 5
Submitted By: Lindsay Haisley (fmouse)
Assigned to: Nobody/Anonymous (nobody)
Summary: Need simple mailman python module

Initial Comment:
When I'm doing utility programming in python for which
I need direct access to the objects in a mailman list,
it would be nice if I could include a module which
would give me this access.  withlist come close, but
still requires that a callback module be defined with
-r, or else an interactive shell is started and
anything defined before the module include goes out of

Here's an example of how it might work.  Supposing
withlist had an option, say -m, that bypassed the
interactive shell as -r does, but didn't requre a
callback module.  I create a symbolic link,
withlist.py, to /usr/local/mailman/bin/withlist and put
this where it's accessable to my script.  I could do
the following:

import sys
sys.argv.extend(["-m", "listname"])
import withlist
..... etc.
..... all list data is now available.

I can do this now by creating a dummy callback module
and  using "-r", but it shouldn't be necessary to go
around the block to get across the street here.  It's
also possible to use os.popen to pull in specific
pieces of information, but in a python context it
should be possible to simply include a python module
and have full access to the objects specific to a list
without having to fork off a process.


>Comment By: Lindsay Haisley (fmouse)
Date: 2006-10-14 17:47

Logged In: YES 

Very well!  You're absolutely right.  Sorry for the noise. 
I'm deleting this feature request.


Comment By: Mark Sapiro (msapiro)
Date: 2006-10-14 15:53

Logged In: YES 

This already exists. Think of /usr/local/bin/Mailman as a
library of Mailman modules.


import sys
from Mailman import MailList
mlist = MailList.MailList('listname', lock=False)


You can respond by visiting: 

More information about the Mailman-coders mailing list