[Mailman-Users] getting count of users
Smith, David
drsmith at fsu.edu
Thu May 21 17:47:03 CEST 2015
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
More information about the Mailman-Users
mailing list