The attached script is handy for reading Mailman 2.1 queue files, eg. bin/show_qfiles qfiles/shunt/*.pck
Help yourselves. Greg -- Greg Ward - software developer [EMAIL PROTECTED] MEMS Exchange http://www.mems-exchange.org
#! /www/python/bin/python """Show the contents of one or more Mailman queue files. Usage: show_qfiles qfile ... Example: show_qfiles qfiles/shunt/*.pck """ import sys from cPickle import load import paths from Mailman.i18n import _ def usage(code, msg=''): if code: fd = sys.stderr else: fd = sys.stdout print >> fd, _(__doc__) if msg: print >> fd, msg sys.exit(code) def main(): if len(sys.argv) < 2: usage(1, "Not enough arguments") for filename in sys.argv[1:]: print "** %s **" % filename file = open(filename) if filename.endswith(".pck"): msg = load(file) sys.stdout.write(str(msg)) else: sys.stdout.write(file.read()) if __name__ == '__main__': main()
_______________________________________________ Mailman-Developers mailing list [EMAIL PROTECTED] http://mail.python.org/mailman-21/listinfo/mailman-developers