From: "Mark J. Reed" Date: 2003-09-19T01:54:59+09:00 Subject: Re: closing stderr On Thu, Sep 18, 2003 at 05:28:31PM +0100, Alan Davies wrote: > Not sure if NUL works on linix/unix Definitely not. It will just create a file in the current directory named "NUL". :) There are no magic filenames on *N?X. There are, however, special files which refer to hardware devices rather than disk storage. These can be named anything, since it's not the name that matters but the file attributes, but there is a standard set of such files in /dev on all systems. One of these is /dev/null, which points to the "null device", which is not a real piece of hardware but a virtual device that just discards everything written to it. Another popular virtual device is /dev/zero, which will happily output zero bytes as long as you care to continue reading from it. In any case, we came up with much the same solution, differing only in the filenames for the null device. The StringIO solution seems like a better choice for cross-platform compatibility, however. -Mark