[Mailman-Users] regular expressions/wildcards in remove_members?

Jim Tittsler jwt at onjapan.net
Wed Aug 25 06:52:39 CEST 2004


On Aug 25, 2004, at 13:22, Adam Steer wrote:

> tried that already, with abysmal failure. I couldn't generate a regular
> expression that would work with 'withlist' either - some hand-editing 
> of
> the condig.db revealed that the address was malformed very badly -

$ bin/withlist -l mylist
 >>> deletions = []
 >>> for member in m.members:
...     if member.find('{') >= 0:
...         deletions.append(member)
...
 >>> print deletions
 >>> for deletion in deletions:
...     del(m.members[deletion])
...
 >>> m.Save()

You could also import the re module if you really need regular 
expressions to isolate the address(es).

-- 
Jim Tittsler             http://www.OnJapan.net/      GPG: 0x01159DB6
Python Starship          http://Starship.Python.net/
Ringo MUG Tokyo          http://www.ringo.net/rss.html




More information about the Mailman-Users mailing list