summaryrefslogtreecommitdiff
path: root/src/mailman/commands/docs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/commands/docs')
-rw-r--r--src/mailman/commands/docs/members.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mailman/commands/docs/members.txt b/src/mailman/commands/docs/members.txt
index 73cd1c252..25642bfd9 100644
--- a/src/mailman/commands/docs/members.txt
+++ b/src/mailman/commands/docs/members.txt
@@ -9,6 +9,7 @@ and remove members from a mailing list.
>>> class FakeArgs:
... input_filename = None
+ ... output_filename = None
... listname = []
>>> args = FakeArgs()
@@ -55,6 +56,30 @@ Members are displayed in alphabetical order based on their address.
Anne Person <anne@example.com>
Bart Person <bart@example.com>
+You can also output this list to a file.
+
+ >>> from tempfile import mkstemp
+ >>> fd, args.output_filename = mkstemp()
+ >>> import os
+ >>> os.close(fd)
+ >>> command.process(args)
+ >>> with open(args.output_filename) as fp:
+ ... print fp.read()
+ Anne Person <anne@aaaxample.com>
+ Anne Person <anne@example.com>
+ Bart Person <bart@example.com>
+ >>> os.remove(args.output_filename)
+ >>> args.output_filename = None
+
+The output file can also be standard out.
+
+ >>> args.output_filename = '-'
+ >>> command.process(args)
+ Anne Person <anne@aaaxample.com>
+ Anne Person <anne@example.com>
+ Bart Person <bart@example.com>
+ >>> args.output_filename = None
+
Adding members
==============