diff options
| author | bwarsaw | 1999-11-16 04:36:09 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-11-16 04:36:09 +0000 |
| commit | 18e7346ed24986d6a8d161faf4dfe13f606fdab9 (patch) | |
| tree | 7046a1e344fb056d935dc02ef4a6499776c76504 | |
| parent | 7d20a6702f4b9dffe9b9a71ee53763075d86c588 (diff) | |
| download | mailman-18e7346ed24986d6a8d161faf4dfe13f606fdab9.tar.gz mailman-18e7346ed24986d6a8d161faf4dfe13f606fdab9.tar.zst mailman-18e7346ed24986d6a8d161faf4dfe13f606fdab9.zip | |
Added an example of how to use the -r option.
| -rw-r--r-- | bin/withlist | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bin/withlist b/bin/withlist index 89be4e14b..d84cdaaee 100644 --- a/bin/withlist +++ b/bin/withlist @@ -48,10 +48,39 @@ Options: The global variable `r' will be set to the results of this call. + See below for an example. + --help -h Print this message and exit +Here's an example of how to use the -r option. Say you have a file in the +Mailman installation directory called `listaddr.py', with the following +two functions: + +def listaddr(mlist): + print mlist.GetListEmail() + +def requestaddr(mlist): + print mlist.GetRequestEmail() + +Now, from the command line you can print the list's posting address by running +the following from the command line: + +% python bin/withlist -r listaddr mylist +Loading list: mylist (unlocked) +Importing listaddr ... +Running listaddr.listaddr() ... +mylist@myhost.com + +And you can print the list's request address by running: + +% python bin/withlist -r listaddr.requestaddr mylist +Loading list: mylist (unlocked) +Importing listaddr ... +Running listaddr.requestaddr() ... +mylist-request@myhost.com + """ import sys |
