On 2/1/2013 3:41 PM, Chris Nulk wrote: > > In the script I use the following to run set_mod.py: > > /usr/lib/mailman/bin/withlist --run /usr/lib/mailman/bin/set_mod > LISTNAME --unset [email protected]
/usr/lib/mailman/bin/withlist --help might help, but the argument to --run is a module name, not a path. The module must be in a directory in Python's sys.path which is why the script says "Save as bin/set_mod.py" which you have correctly done, but the command you need is /usr/lib/mailman/bin/withlist --run set_mod LISTNAME --unset [email protected] > [...] > Just to make sure I am running withlist and set_mod correctly, I did > change into the mailman directory (/usr/lib/mailman) and run the command > as recommended in the documentation: > > bin/withlist --run bin/set_mod LISTNAME --unset [email protected] That is not the command recommended in the documentation which says: Save as bin/set_mod.py Run via bin/withlist -r set_mod <listname> <option> <member> ... [...] > As a matter of fact, things went from bad to worse. All the different > trys I did may have corrupted my test list. I had to delete the list > and recreate it. Those errors from withlist should not have corrupted your list. The script never got far enough to save any changes. However, if at any point you gave the '-l' option to withlist, withlist might have left the list locked. It shouldn't, but it's hard to say without more info. > Is there a magic incantation so I can run set_mod.py in a script like my > first command above? It's not magic. See above. > Is there an easy way to modify set_mod.py so I can run it without using > withlist (like add_members, remove_members, etc.)? Easy for me, yes. There is a moral here. Before handling loaded guns, you need to take the gun safety class or you might shoot yourself in the foot. The analogy to the gun safety class here is perhaps <http://wiki.python.org/moin/BeginnersGuide>. -- Mark Sapiro <[email protected]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list [email protected] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
