[Mailman-Users] running newlist script from within a script

Mark Williamson markw at tabnet.com
Fri Jan 29 03:04:52 CET 1999

I need to execute another script like from the command line, passing
arguments just as i would do it at the command line.  what i am trying
to do is build an interface to the newlist script via email, so i

    def ProcessNewListCmd(self, args, cmd, mail):
        if len(args) < 4:
    self.AddError("missing arguments")
        cmd = "%s %s %s >> /etc/aliases" % (mm_cfg.PYTHON,
        cmdproc = os.popen(cmd, 'r')
 status = cmdproc.close()
        if status:
                        'Non-zero exit status: %d\nCommand: %s' %
((status >> 8), cmd))

(yes, i'm going to add error checking later)

but it's not working at this point.  can someone help?  The python docs
are lacking details in many areas, and the exec, popen, etc are ones
that i need docs on :)

Mark Williamson

More information about the Mailman-Users mailing list