On Feb 14, 9:41 pm, "Bernard Lebel" <[EMAIL PROTECTED]> wrote:
> 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.
It seems, that you're trying to reinve
Bernard Lebel wrote:
> 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.
assum
On Feb 15, 11:08 am, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Bernard Lebel a écrit :
>
> > Diez: thanks, I will try that. However isn't sum() returning an
> > integer that here would represent the number of elements?
>
> Nope, it will return the sum of the length of the lines in the list.
Bernard Lebel a écrit :
> Diez: thanks, I will try that. However isn't sum() returning an
> integer that here would represent the number of elements?
Nope, it will return the sum of the length of the lines in the list. The
long way to write it is:
total = 0
for line in thelist:
total += len(l
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()
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,
Bernard Lebel wrote:
> 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, a
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