[BangPypers] How to handle files efficiently in python

Senthil Kumaran orsenthil at gmail.com
Thu Mar 24 13:13:38 CET 2011


Vishal wrote:
> size of the actual data. You should use something like this:
> http://code.activestate.com/recipes/546530/ . I saved this recipe by the
> name of PyObjSize which I have used below.
> 
> >>> import PyObjSize
> >>> PyObjSize.asizeof(l)
> 3145848
> >>> l[0] = None
> >>> PyObjSize.asizeof(l)
> 2097256
> >>> collect()
> 0

Thanks! That helps in understanding it better.

-- 
Senthil


More information about the BangPypers mailing list