In message <[EMAIL PROTECTED]>, Sion Arrowsmith wrote: > Torsten Bronger <[EMAIL PROTECTED]> wrote: >>Marc 'BlackJack' Rintsch writes: > >>> `os.devnull`? > >>Yes, but I wasn't really sure how portable it is, in particular, on >>Windows. > > Windows has a NUL: device which behaves like /dev/null .
It's not a device, it's a reserved file name. Or rather, a reserved file name prefix: any attempt to open a file name beginning with NUL, e.g. NUL.DAT, will cause your output to disappear into a black hole. This has bitten Windows users more than once. -- http://mail.python.org/mailman/listinfo/python-list