I think you are getting this wrong. IMAPClient is an IMAP client, so it can handle Imap, thunderbird is also an email (including Imap) client, so It's redudant, you don't need this to use that. Unfortunately IMAPclient doesn't seem to have an attachment handling method (atleast what I could tell from the docs). but a quick google search pointed me to python's native imaplib as a possible candidate to do what you want together with python's email lib. the first to access you gmail acount, and the second to get the message. a possible (also not exactly your use case) scenerio is outlined in this [receipe]ץ(http://code.activestate.com/recipes/302086-strip-attachments-from-an-email-message/)
also a very similiar stackoverflow question.
the trick is that there isn't a detach
attachment method in **email* lib. you have to reset the message payload to simulate this effect.