![](https://secure.gravatar.com/avatar/cd5a39000519645299b18193b95903de.jpg?s=120&d=mm&r=g)
Jan. 28, 1999
6:04 p.m.
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 attempted:
def ProcessNewListCmd(self, args, cmd, mail):
if len(args) < 4:
self.AddError("missing arguments")
return
cmd = "%s %s %s >> /etc/aliases" % (mm_cfg.PYTHON,
"/home/mailman/bin/newlist",
args)
cmdproc = os.popen(cmd, 'r')
status = cmdproc.close() if status: self.LogMsg('newlist', 'Non-zero exit status: %d\nCommand: %s' % ((status >> 8), cmd)) self.AddToResponse('Succeeded.')
(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 :)
Regards, Mark Williamson
9514
Age (days ago)
9514
Last active (days ago)
0 comments
1 participants
participants (1)
-
Mark Williamson