How to suppress the output of an external module ?

Scott David Daniels scott.daniels at acm.org
Sat Dec 30 12:47:20 EST 2006


MRAB wrote:
> Scott David Daniels wrote:
>> fdu.xiaojf at gmail.com wrote:
> In Windows the null device is, strictly speaking, "nul" or "nul:", not
> "nul.txt", but the latter appears to work too.

Although I find the windows design and reasoning to be a mistake, I
believe the use of file names NUL, PRN, and CON (at least) are diverted
to the corresponding device (data sink, printer, console) regardless of
directory and/or extension.  The idea, I believe, was that too many
programs take a name from the user and slap the extension they intend to
use on the end, and even put a directory on the front.  So, the OS
ignores those parts and switches to the chosen device.  I use .txt for
two reasons: to remind me to avoid those names, and to indicate I am
doing straight text output.

--Scott David Daniels
scott.daniels at acm.org



More information about the Python-list mailing list