我不确定是不是因为 sys.stderr.write 更快。
请您参考如下方法:
imaplib 比日志记录模块 (Python2.3) 老得多(它在 Python1.5.2 中),所以也许还没有人需要更新它来使用日志记录