David <ww...@yahoo.com> wrote: > >I am writing Python script to process e-mails in a user's mail >account. What I want to do is to update that e-mail's Status to 'R' >after processing it, however, the following script truncates old e- >mails even though it updates that e-mail's Status correctly. Anybody >knows how to fix this?
Truncates in what way? When I tried this, it seemed to work fine. Note, however, that it is somewhat dangerous to modify an iterator while you are using it. (That is, you are setting mbox[key] while doing mbox.iteritems.) I might suggest you grab the keys as a list and iterate through them: for key in mbox.keys(): msg = mbox[key] ... -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list