[Mailman-Users] -EXT-Re: How does one edit the .pck files?

Mark Sapiro mark at msapiro.net
Thu May 31 16:58:42 EDT 2018


On 05/31/2018 01:14 PM, Parker, Michael D. wrote:
> Hmm....not being a python expert, where is a pointer to manipulating the file using withlist....
> 
> Specifically listing a variable, changing a variable, and then writing it back to the file?


bin/withlist -l LISTNAME
Loading list LISTNAME (locked)
The variable `m' is the LISTNAME MailList instance
>>> m.ATTRIBUTE_NAME
value of ATTRIBUTE_NAME prints
>>> m.ATTRIBUTE_NAME = NEW_VALUE
>>> m.Save()
>>> m.Unlock()
>>>       <- control-D to exit.

But do not do this!! There are already scripts to do most of what you
would want. withlist is for people who know enough Python and Mailman
internals to know what to do without asking. If you aren't one of those
people, you can easily shoot yourself in the foot.

Instead, describe what you are trying to accomplish in a post to this
list, and we will help you find a safe way to do it.

I have answered your specific question in another post. The answer
involves setting things properly in mm_cfg.py and then using withlist
but with a script fix_url.py that is much safer.

Also, in addition to the FAQ article I pointed to in the prior answer,
you might see <https://wiki.list.org/x/17892007?>.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan


More information about the Mailman-Users mailing list