Re: sending commands to the unix shell

2010-10-12 Thread Lawrence D'Oliveiro
In message , Chris Rebert wrote: > On the gripping hand, you should consider just using smtplib to send > the email directly from Python and thus avoid having to run an > external command at all: > http://docs.python.org/library/smtplib.html But then you have to worry about configuration setting

Re: sending commands to the unix shell

2010-10-11 Thread Chris Rebert
On Mon, Oct 11, 2010 at 7:30 PM, Rodrick Brown wrote: > Trying to do something very trivial why is it failing It would have been helpful if you had specified in exactly what way(s) they were failing. > I've tried three approaches >     1. os.system("/bin/cat %s | /bin/mail -s \'connection error\

sending commands to the unix shell

2010-10-11 Thread Rodrick Brown
Trying to do something very trivial why is it failing I've tried three approaches 1. os.system("/bin/cat %s | /bin/mail -s \'connection error\' %s" % (logFile,notifyList)) 2. os.system("/bin/mail -s \'connection error\' %s < %s" % (notifyList,logFile)) 3. p1 = sp.Popen(["/bin/cat", log