Hallöchen!
Carsten Haese writes:
> On Sat, 2007-09-08 at 18:52 +0200, Torsten Bronger wrote:
>
>> Is there a portable and simply way to direct file-like IO to
>> simply nothing? [...]
>>
>> [...]
>
> This might work:
>
> class LogSink(object):
> def write(self, *args, **kwargs): pass
> def flush(self, *args, **kwargs): pass
>
> logging.basicConfig(stream=LogSink())
>
> I haven't tested this thoroughly, so it's possible that there are
> more methods that the stream is expected to implement.
No, write and flush are enough. Thank, this works.
Tschö,
Torsten.
--
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: [EMAIL PROTECTED]
(See http://ime.webhop.org for ICQ, MSN, etc.)
--
http://mail.python.org/mailman/listinfo/python-list