[Tutor] Use python to parse the subject line of emails, listen for and react to commands

Alan Gauld alan.gauld at btinternet.com
Fri Feb 27 01:18:23 CET 2015


On 26/02/15 20:51, Willie Sims wrote:
> I know py can parse emails,  but I cant figure out how to limit to only
 > the subject and only if its in that certain format
> and only if its coming from a recognized email address

OK, Show us what you've tried. That makes it easier for us to see what 
is tripping you up. Otherwise we are just guessing.

All 3 things you ask for can be done but we need a starting point and 
the best one is your existing, but faulty, code.

> and since I'm using 3.4 it seems all the other kind of examples don't work

A lot of old examples on the web will be for Python v32 and there are 
significant differences to v3.

However, Python v3 has not lost any important functionality so
whatever worked in v2 can be made to work in v3. Again we just
need a clue as to what you are trying to do. (show us your
code - and any error messages and tell us your OS too)

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list