New submission from Jean Brouwers <mrje...@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. 
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.

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

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5870>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to