Re: [Tutor] Iterator Merging

2009-11-11 Thread Alan Gauld
"Kent Johnson" wrote > What I'm trying to work out is how to feed the data I have - 6 streams > of timestamp, entry into imerge. merged = imerge(*magpie.logs) for timestamp, entry in itertools.islice(merged, 3): print timestamp, entry And stating the obvious, test it with smaller test

Re: [Tutor] Iterator Merging

2009-11-11 Thread Kent Johnson
On Wed, Nov 11, 2009 at 7:54 AM, Stephen Nelson-Smith wrote: > So, following Kent and Alan's advice, I've preprocessed my data, and > have code that produces 6 LogFile iterator objects: > import magpie magpie.logs[1] > for timestamp, entry in itertools.islice(magpie.logs[1], 3): > .

[Tutor] Iterator Merging

2009-11-11 Thread Stephen Nelson-Smith
So, following Kent and Alan's advice, I've preprocessed my data, and have code that produces 6 LogFile iterator objects: >>> import magpie >>> magpie.logs[1] >>> dir(magpie.logs[1]) ['__doc__', '__init__', '__iter__', '__module__', 'date', 'logfile', 'timestamp'] >>> for timestamp, entry in iter