[Mailman-Users] getting count of users
mat houser
mhouser at uwm.edu
Thu May 21 19:31:02 CEST 2015
len(mlist.members) should work.
--
-------------
mat:houser
mhouser at uwm.edu
uwm:uits:iam-support
-------------
On Thu, 21 May 2015, Smith, David wrote:
Hi folks,
I've written a little script to give me output of the following from any or all listservs we manage. Listname, Last Activity, List Creation Date, Anonymous List, Admins
I'd like to add a count of users into the mix, but just cannot seem to get my head around it.
Here is my script :
"""Display the last post time for a list or all lists.
Save as bin/FSU_listCheck.py
Run via
bin/withlist -r FSU_listCheck listname
or
bin/withlist -a -r FSU_listCheck
to do all lists.
"""
import time
def FSU_listCheck(mlist):
#This process outputs the following : listname, Last Activity, List Creation Date, Anonymous List, Admins
print '%s; %s; %s; %s; %s' % (
mlist.real_name,
time.strftime('%Y/%m/%d %I:%M %p',time.localtime(mlist.last_post_time)),
time.strftime('%Y/%m/%d %I:%M %p',time.localtime(mlist.created_at)),
mlist.advertised,
mlist.owner
)
I am sure it's some sort of mlist.usernames and then maybe using a cmd= 'wc -l' , but I cannot get it to jibe.. any help?
Thanks!
Dave Smith drsmith at fsu.edu<mailto:drsmith at fsu.edu> (850)645-8024
Linux Administrators its-unixadmins at fsu.edu<mailto:its-unixadmins at fsu.edu> (850)644-2591
Information Technology Services Florida State University
------------------------------------------------------
Mailman-Users mailing list Mailman-Users at python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: https://mail.python.org/mailman/options/mailman-users/mhouser%40uwm.edu
More information about the Mailman-Users
mailing list