I want to read letters from the mbox file and perform some actions based on this. I do not want to write / modify the mbox file, but it will be modified by another process (most often adding new letters).
I am reading this documentation. http://docs.python.org/library/mailbox.html#mailbox.mbox
But I do not understand the following
- Should I call lock () before reading mail? (I am not writing a file)
- Anyway, can I get a callback when another process (thunderbird) modifies the file?
- Are file changes reflected in the mbox object? I mean, after creating the mbox object, if a new letter is added to the file, will I get access to the message using the object? Or should I create a new object again?
PS: I'm not allowed to install any thunderbird plugins :(
balki source share