[Mailman-Users] View all topics and who's subscribed to them
Kanwar Ranbir Sandhu
m3freak at thesandhufamily.ca
Wed May 9 21:20:15 CEST 2012
On Tue, 2012-05-08 at 19:00 -0700, Mark Sapiro wrote:
> You probably need to create at least a withlist script, but it's pretty
> simple. something like
>
>
> def list_topics(mlist):
> if mlist.topics:
> print ('List %s has the following topics defined:' %
> mlist.real_name)
> for name, pattern, desc, emptyflag in mlist.topics:
> print ' Topic name: %s; Pattern: %s' % (name, pattern)
> print ' Subscribed users:'
> for user in mlist.getRegularMemberKeys():
> if name in mlist.getMemberTopics(user):
> print ' %s' % user
> else:
> print 'List %s has no topics defined.' % mlist.real_name
>
>
> This will print a topic followed by the list of users subscribed to it,
> followed by the next, etc.
I tried the first one and it worked! I got exactly the info I needed,
and I learned about the "withlist" script - thanks!
Note: I have not been using mailman for very long, so I'm still learning
lots (i.e. massive gaps in knowledge). :P
Regards,
Ranbir
--
Kanwar Ranbir Sandhu
Linux 3.3.2-6.fc16.x86_64 x86_64 GNU/Linux
15:20:11 up 20:05, 3 users, load average: 0.05, 0.06, 0.05
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/mailman-users/attachments/20120509/347f459b/attachment.pgp>
More information about the Mailman-Users
mailing list