https://pypi.python.org/pypi/pygraphviz/
https://pypi.python.org/pypi/Dozer/
https://github.com/wyplay/pytracemalloc
https://pypi.python.org/pypi/memory_profiler
# -*- coding: utf-8 -*-
from memory_profiler import profile
fp=open('memory_profiler.log','w+')
@profile(stream=fp)
def my_func():
a = [1] * (10 ** 6)
b = [2] * (2 * 10 ** 7)
del b
return a
if __name__ == '__main__':
my_func()