There might be a memory leak in string.strip. I wrote a python function to strip blanks off the left and right of a string. When I discovered string.strip, I replaced the call to my version with string.split, and I got a large memory leakage. When I put the call back to calling my python function, the memory leakage went away.