Grab certain text from gmail using python

All new tutorial are submitted here.
They will be moved to the main Tutorials section once they have been approved by mods and admins.

Grab certain text from gmail using python

Postby bhishan » Fri Jun 06, 2014 4:48 pm

This article explains line by line code on extracting certain text from gmail using the standard library in python, imaplib. This type of program could be applicable in real life as shown through the post. :)
http://www.thetaranights.com/how-to-grab-certain-text-from-gmail-using-python/
bhishan
 
Posts: 18
Joined: Sun May 18, 2014 7:57 am
Location: Kathmandu, Nepal

Re: Grab certain text from gmail using python

Postby micseydel » Sat Jun 07, 2014 12:35 am

I think that your code for actually extracting the word from the email is very obfuscated compared to how it could be. I think that using regular expressions might be much much simpler. I think it would be more appropriate if you create a blog, rather than framed this as a tutorial, or posted it here asking for feedback rather than framing it as advice to others.

Also, I glossed over your NPR "tutorial" before but after a quick look I see you're doing string manipulation where it would be better to use higher level method for creating REST requests or maybe even formatted URLs if you have to even drop down that low level.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1367
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Grab certain text from gmail using python

Postby bhishan » Sat Jun 07, 2014 2:24 am

Thanks for your feedback. I shall improve with my code. Anyways I felt like I got a mentor. :)
bhishan
 
Posts: 18
Joined: Sun May 18, 2014 7:57 am
Location: Kathmandu, Nepal


Return to Tutorial Submissions

Who is online

Users browsing this forum: No registered users and 1 guest

cron