--- list_members 2009-01-12 11:52:24.687500000 -0800 +++ pw_list_members 2009-01-19 10:47:48.359375000 -0800 @@ -1,6 +1,6 @@ #! /usr/bin/python # -# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2009 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -44,6 +44,9 @@ --fullnames / -f Include the full names in the output. + --passwords / -w + Include the member's password in the output + --preserve / -p Output member addresses case preserved the way they were added to the list. Otherwise, addresses are printed in all lowercase. @@ -153,6 +156,7 @@ kind = None fullnames = False invalidonly = False + passwords = False unicodeonly = False # Throw away the first (program) argument @@ -169,6 +173,8 @@ usage(0) elif opt in ('-f', '--fullnames'): fullnames = True + elif opt in ('-w', '--passwords'): + passwords = True elif opt in ('-p', '--preserve'): preserve = True elif opt in ('-r', '--regular'): @@ -246,26 +252,29 @@ all.sort() for addr in all: name = fullnames and mlist.getMemberName(addr) or '' + pw = passwords and mlist.passwords[addr.lower()] or '' showit = False if invalidonly and isinvalid(addr): showit = True if unicodeonly and isunicode(addr): showit = True if showit: - print >> fp, formataddr((safe(name), addr)) + print >> fp, formataddr((safe(name), addr)), pw return if regular: rmembers.sort() for addr in rmembers: name = fullnames and mlist.getMemberName(addr) or '' + pw = passwords and mlist.passwords[addr.lower()] or '' # Filter out nomails if nomail and not whymatches(mlist, addr, why): continue - print >> fp, formataddr((safe(name), addr)) + print >> fp, formataddr((safe(name), addr)), pw if digest: dmembers.sort() for addr in dmembers: name = fullnames and mlist.getMemberName(addr) or '' + pw = passwords and mlist.passwords[addr.lower()] or '' # Filter out nomails if nomail and not whymatches(mlist, addr, why): continue @@ -278,7 +287,7 @@ # They're getting MIME digests if kind == 'plain': continue - print >> fp, formataddr((safe(name), addr)) + print >> fp, formataddr((safe(name), addr)), pw