[New-bugs-announce] [issue5870] subprocess.DEVNULL

Jean Brouwers report at bugs.python.org
Tue Apr 28 21:24:04 CEST 2009

New submission from Jean Brouwers <MrJean1 at Gmail.com>:

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. 

Perhaps, that might be as simple as

DEVNULL = os.open(os.devnull, os.OS_RDWR)

and re-use the same, single file descriptor.

components: Extension Modules
messages: 86761
nosy: MrJean1
severity: normal
status: open
title: subprocess.DEVNULL
type: feature request
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list