[Mailman-Users] how to get the list of members in a list

Mark Sapiro mark at msapiro.net
Sun Feb 3 23:03:42 CET 2008


Brandon Sussman wrote:
>
>Mark Sapiro wrote:
>|>  How do I get the list of members in list, number of members, the
>admin interface provides page by page or filter by name.
>|
>| See
>| <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq03.062.htp>.
>|
>I have been playing with your script referenced in that faq.
>
>I note "Tested with the Mailman 2.1.5 - 2.1.8 member roster layout.".  I
>assume those releases's web page layouts as well.


Actually, it means the admin Membership list page layout, and it also
works for me with Mailman 2.1.9 and 2.1.10. I have updated the note in
the script accordingly.


>Here is the admin URI that works for me (real list and server name xxxed
>and yyyed):
>
>http://lists.xxxx.net/admin.cgi/yyyy-xxxx.net/members
>
>Command line as I think should have worked:
>
>mailman-subscribers.py --url_path /admin.cgi lists.xxxx.net
>yyyy-xxxx.net listpswd
>
>(watch out for line break)


This looks correct.


>I made changes to get it to work with 2.1.9 (Dreamhost's release),
>changing the server string and the letters variable (hardcoding the
>entire alphabet into it).
>
>Can you say if the changes I had to make as described below due to 2.1.9
>differences or Dreamhost-monkeying-with-it differences?
>
>1. From the usage, it seemed that '--url_path /admin.cgi' was literally
>~ correct for me but the string it constructed was wrong and when I hard
>coded my uri:
>- --line of code follows:
>member_url = 'http://lists.xxxx.net/admin.cgi/yyyy-xxxx.net/members'
>- --end
>it works as expected.


There was a bug in processing the --url_path option. '-u /admin.cgi'
would have worked, but --url_path was completely broken (the option
list was missing a comma between "url_path=" and "verbose"). It is
fixed now on the web sites.


>2. The script had problems finding all the letters - it only processed
>the first one present in the membership list.  This sloppy change just
>before the while loop that gets the chunks worked:
>- --line of code follows:
>letters = "2ABCDEFGHIJKLMNOPQRSTUVWXYZ"
>- --end


This is because you hard coded member_url. In so doing, you left
url_path with it's default '/mailman/admin' value which makes it
impossible for the parser in the script to find the letters.

If you get the corrected script, you should be able to run it with the
'--url_path /admin.cgi' option and everything should work.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list