diff options
| author | Barry Warsaw | 2010-01-23 19:22:35 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2010-01-23 19:22:35 -0500 |
| commit | 0ea2e10deb8e05a6afd6bb0bd32f62ee4e00ba83 (patch) | |
| tree | cd124f45f5601df565548b82077df2890ed8b19b /src/mailman/commands/docs | |
| parent | d43c22c050926fdc438697399addfea4017ecafc (diff) | |
| download | mailman-0ea2e10deb8e05a6afd6bb0bd32f62ee4e00ba83.tar.gz mailman-0ea2e10deb8e05a6afd6bb0bd32f62ee4e00ba83.tar.zst mailman-0ea2e10deb8e05a6afd6bb0bd32f62ee4e00ba83.zip | |
-o/--output
Diffstat (limited to 'src/mailman/commands/docs')
| -rw-r--r-- | src/mailman/commands/docs/members.txt | 25 |
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 ============== |
