My python program decodes a certain type of email with:
typ, rfc = self.mail.uid(\'fetch\', num, \'(RFC822)\')