sending email in python with gmail

A {{Python}} nugget from {{Programming Your Home}} (review) I wanted to share from p97: import smtplib def send_email(subject, message) recipient = ‘your_email_recipient@domain.tld’ gmail_sender = ‘your_gmail_account@gmail.com’ gmail_password = ‘your_gmail_password’ #use tls gmail_smtp = smtplib.SMTP(‘smtp.gmail.com’, 587) gmail_smtp.ehlo() gmail_smtp.starttls() gmail_smtp.ehlo() #login gmail_smtp.login(gmail_send, gmail_password) #message formatting mail_header = ‘To: ‘ + recipient + ‘\n’ + ‘From: ‘ + gmail_sender …
Continue reading sending email in python with gmail

programming your home by mike riley

{{Mike Riley}}’s entry in {{The Pragmatic Programmers}} series, {{Programming Your Home}} – automating with {{Arduino}}, {{Android}}, and your computer – was a lot of fun. While I am not really in a position to do many of the mini projects given in the book (wrong type of house plus we rent), reading some of the …
Continue reading programming your home by mike riley

what is the “new” python?

9 years ago, {{Paul Graham}} made a controversial statement: [W]hen you choose a language, you’re also choosing a community. The programmers you’ll be able to hire to work on a {{Java}} project won’t be as smart as the ones you could get to work on a project written in {{Python}}. And the quality of your …
Continue reading what is the “new” python?