Parse ASCII log ; sort and keep most recent entries
Christos TZOTZIOY Georgiou
tzot at sil-tec.gr
Thu Jun 17 07:38:30 EDT 2004
On Wed, 16 Jun 2004 19:41:58 -0400, rumours say that Peter Hansen
<peter at engcorp.com> might have written:
[snip]
>If you don't care about the order of the final
>result, just open a file and with one line the reduced data
>is written out:
>
> newfile.write(''.join(d.values()))
or
newfile.writelines(d.values()) # 1.5.2 and later
or
newfile.writelines(d.itervalues()) # 2.2 and later
--
TZOTZIOY, I speak England very best,
"I have a cunning plan, m'lord" --Sean Bean as Odysseus/Ulysses
More information about the Python-list
mailing list