Help: sizeof() and reference in python?

Toby Dickenson mbel44 at
Wed Mar 8 10:32:32 CET 2000

"Gene Chiaramonte" <gchiaramonte at> wrote:

>When working with large datasets, I need to monitor memory usage, so I can
>warn a user about impending doom before it happens and they call me
>screaming that my program sucks. Thus, I can tell them they suck first.

Would it be reasonable to measure the size of the data set by pickling
it, and measuring the size of the pickle? You don't have to store the
whole pickle in memory if you create a new file-like object that
simply counts how many bytes have been written to it without recording
those bytes.

Toby Dickenson
tdickenson at

More information about the Python-list mailing list