Diez: thanks, I will try that. However isn't sum() returning an integer that here would represent the number of elements?
Bruno: good question. We're talking about text files that can have 300,000 lines, if not more. Currently, the way I have coded the file writing, every line calls for a write() to the file object, which in turns write to the text file. The file is on the network. This is taking a long time, and I'm looking for ways to speed up this process. I though that keeping the list in memory and dropping to the file at the very end could be a possible approach. Bernard On 2/14/07, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Bernard Lebel a écrit : > > Hello, > > > > I would like to know if there is a way to know how much memory (bytes, > > kilobytes, megabytes, etc) a name is using. > > > > More specifically, I have this list of strings that I want to write to > > a file as lines. > > This list grows througout the script execution, and toward the end, > > the file is written. > > Do you really need to first grow the list then write it ? > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list