Re: sending commands to the unix shell

2010-10-12 Thread Chris Rebert
On Mon, Oct 11, 2010 at 7:30 PM, Rodrick Brown rodrick.br...@gmail.com 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

Re: sending commands to the unix shell

2010-10-12 Thread Lawrence D'Oliveiro
In message mailman.1600.1286865707.29448.python-l...@python.org, 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

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, logFile],