[Tutor] Logfile Manipulation
Gerard Flanagan
grflanagan at gmail.com
Mon Nov 9 14:20:41 CET 2009
Stephen Nelson-Smith wrote:
> Hi,
>
>
>>> Any advice or experiences?
>>>
>>>
>> go here and download the pdf!
>> http://www.dabeaz.com/generators-uk/
>> Someone posted this the other day, and I went and read through it and played
>> around a bit and it's exactly what you're looking for - plus it has one vs.
>> slide of python vs. awk.
>> I think you'll find the pdf highly useful and right on.
>>
>
> Looks like generators are a really good fit. My biggest question
> really is how to multiplex.
>
> I have 6 logs per day, so I don't know how which one will have the
> next consecutive entry.
>
> I love teh idea of making a big dictionary, but with 6G of data,
> that's going to run me out of memory, isn't it
>
>
Perhaps "lookahead" generators could help? Though that would be getting
into advanced territory:
http://stackoverflow.com/questions/1517862/using-lookahead-with-generators
More information about the Tutor
mailing list