There are times when I want to set an attribute on a whole bunch of mailing lists en 
masse. I tried to write a withlist script to do this, but it only works when the 
attribute value is a string. It doesn't work if the value is an integer. I'm no Python 
expert, but I thought from reading the docs that eval(`value`) would result in an 
expression of the correct type. No such luck.

To keep things simple, the script does only one list at a time, and I run it from a 
shell "for" loop.
def set_attr(mlist, attr, value): 
    setattr(mlist, attr, eval(`value`)) 
    mlist.Save()

What am I missing?

Thanks,
- Bob



------------------------------------------------------
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py

Reply via email to