Hello everybody, I'm pondering the following problem:
I want to write a Python program that receives messages via SMTP and stores them in a dict or an array. For my purposes it would be important that all received mail would be kept in RAM and not cached out to disk. If a new message comes in that can't fit in the allocated memory, a number of old messages would be discarded. As the server needs to have room for other tasks, I'd like to limit the overall memory consumption to a certain amount. Is this possible? How would I go about implementing it? By imposing "ulimit"s and catching MemoryError? Thanks for your help, Jonas -- http://mail.python.org/mailman/listinfo/python-list