I thought that the whole idea of using python is that list operations (creation, disposal, insertion, deletion) are efficient and are subject to memory reuse when possible. Of course I can always resort to manually writing to buffers and build my format one write at a time but how that would be different from writing C code from an expressiveness point of view.
The issue here is not that I can't do it - it is more than doable just I want to do it preserving the same python spirit as much as possible (hope this came out right).
As for the references that deny me of free available memory probably will have to strip down everything and start from scratch because trying out the sample code provided by Dave seems to get more or less the same results. So if there will not a lot of frequent object creation after the initial message format creation (just occasional integers and lists (no further dynamic string creation)) the program can run more or less indefinitely.