Message 86761 - Python tracker (original) (raw)
The subprocess module exposes the PIPE and STDOUT constants to be used for the stdin, stdout or stderr keyword arguments.
Often, stderr needs to be redirected to /dev/null (on posix). It would nice if another constant was available for that purpose, e.g. subprocess.DEVNULL.
Perhaps, that might be as simple as
DEVNULL = os.open(os.devnull, os.OS_RDWR)
and re-use the same, single file descriptor.