Python Script

Author Gravatar Image MIKEY SKLAR
Now you're ready to write the code to check your gmail IMAP email (using feedparser) and light up the red or green LEDs 

Copy and paste the following text starting with cat << ! > raspi-gmail.py and ending with the ! and paste that into your SSH window to paste all of the code into a new file called raspi-gmail.py
https://gist.github.com/ladyada/3062225
Don't forget to set the username and password to match your gmail account! You can edit the file after the fact using the simple text editor nano, that is run nano raspi-gmail.py  to make simple edits

Next up, we'll make the file into an application (executable), type chmod +x raspi-gmail.py

Finally you can run the script! Type in sudo ./raspi-gmail.py 

Send yourself some emails to see the green LED light up!
Last updated on 2014-04-06 at 06.21.53 AM Published on 2012-07-29 at 03.58.38 PM