On Mon, Mar 18, 2019, at 2:38 AM, Alan So wrote:
I tried to do so using Mailman client but it is really slow for lists with size > 1000. I use the following code snippet:
my_list = client.get_list(listname)
print ("number of members =", len(my_list.members))
Are there any other ways to do so in a much faster speed? Thanks.
If you have too many members, the above can be slow. You can instead do:
$ mylist.get_member_page(count=2).total_size
This will basically return Paginated list of members, and a Page object has an attribute total_size, which will return the total count.
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)