On Tue, Nov 10, 2009 at 3:59 PM, Stephen Nelson-Smith
<[email protected]> wrote:
> On Tue, Nov 10, 2009 at 3:48 PM, Stephen Nelson-Smith
> <[email protected]> wrote:
>
>> OK, so now i've given it the full load of logs:
>>
>>>>> for time, entry in kent.logs:
>> ...   print time, entry
>> ...
>> Traceback (most recent call last):
>>  File "<stdin>", line 1, in ?
>> ValueError: too many values to unpack
>>
>> How do I get around this?!
>
> Erm, and now it's failing with only one logfile...
>
> Code here:
>
> http://pastebin.ca/1665013

OK - me being dumb.

So what I want to do is be able to multiplex the files - ie read the
next line of all 12 files at once, filter them accordingly, and then
write them out to one combined file.

My old code did this;

min((x.stamp, x) for x in logs)

What's the best way to do this now I'm using an iterable LogFile class?

S.
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to