sending commands to the unix shell

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Tue Oct 12 03:05:59 EDT 2010


In message <mailman.1600.1286865707.29448.python-list at 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 then you have to worry about configuration settings to communicate with 
the right SMTP server.

Household-name programs like Mutt simply spawn a /usr/sbin/sendmail command, 
on the assumption that that already knows the right configuration settings, 
no need to duplicate them, so why not follow that example?



More information about the Python-list mailing list