Sounds awesome. Just yesterday I was trying to hack pipelining support into imaplib, ultimately for use with Tornado. I'd be very interested in your implementation.
Thanks! I'll be sure to make a show HN or something when I do. I still need to add in support for compression, but it's not high on my todo list and I'm sure the community could help.