Brendan Miller schrieb:
> Hi,
> 
> I have functions that take a file object and write to it. In some cases I
> just want to throw out what is written to that file object. I want
> something like open('/dev/null', 'w'), but portable.

import os
null = open(os.devnull, "wb")

:)

Christian
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to