[Tutor] Logfile multiplexing
Stephen Nelson-Smith
sanelson at gmail.com
Tue Nov 10 16:48:43 CET 2009
Hello,
On Tue, Nov 10, 2009 at 2:00 PM, Luke Paireepinart
<rabidpoobear at gmail.com> wrote:
>
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> File "kent.py", line 11, in __iter__
>> if stamp.startswith(date):
>> NameError: global name 'date' is not defined
>>
>> How does __iter__ know about date? Should that be self.date?
>
> Yes. self.date is set in the constructor.
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?!
S.
More information about the Tutor
mailing list