Re: parsing IMAP responses?

2005-02-15 Thread Alan Kennedy
[Grant Edwards] Is there a library somewhere that impliments the IMAP protocol syntax? [Paul Rubin] It's very messy. [Grant Edwards] It sure is. You'd think something intended to be machine-readable would be easier to parse. IMHO, email is the most disgracefully badly spec'ced application in

Re: parsing IMAP responses?

2005-02-14 Thread Paul Rubin
Grant Edwards [EMAIL PROTECTED] writes: The imaplib module return values are mostly useless as-is: they're just whatever string the server sent (or in some cases a list of strings). You've got to parse them using the IMAP syntax before you can do much with them. Is there a library

Re: parsing IMAP responses?

2005-02-14 Thread Grant Edwards
On 2005-02-14, Paul Rubin http wrote: Is there a library somewhere that impliments the IMAP protocol syntax? It's very messy. It sure is. You'd think something intended to be machine-readable would be easier to parse. I don't know of one that's in distribution. That's what I thought

Re: parsing IMAP responses?

2005-02-14 Thread Fredrik Lundh
Grant Edwards wrote: Is there a library somewhere that impliments the IMAP protocol syntax? It's very messy. It sure is. You'd think something intended to be machine-readable would be easier to parse. nobody knows what the IMAP protocol designers intended... (it's not quite as bad as

Re: parsing IMAP responses?

2005-02-14 Thread Damien Wyart
* Grant Edwards [EMAIL PROTECTED] in comp.lang.python: Is there a library somewhere that impliments the IMAP protocol syntax? Maybe the core part of getmail could be reused, it seems cleanly written. http://www.qcc.ca/~charlesc/software/getmail-4/ -- DW --

Re: parsing IMAP responses?

2005-02-14 Thread Grant Edwards
On 2005-02-14, Damien Wyart [EMAIL PROTECTED] wrote: * Grant Edwards [EMAIL PROTECTED] in comp.lang.python: Is there a library somewhere that impliments the IMAP protocol syntax? Maybe the core part of getmail could be reused, it seems cleanly written.

RE: parsing IMAP responses?

2005-02-14 Thread Tony Meyer
Is there a library somewhere that impliments the IMAP protocol syntax? Twisted has pretty good IMAP support (particularly client), and it's much higher level than imaplib. It probably does what you're after. Of course, the catch is that you have to use twisted 0.5 wink. =Tony.Meyer --