[New-bugs-announce] [issue11384] Deprecate, remove or document (correctly) os.popen

STINNER Victor report at bugs.python.org
Thu Mar 3 12:29:09 CET 2011

New submission from STINNER Victor <victor.stinner at haypocalc.com>:

os.popen() was deprecated in Python 2.6 but it does still exist in Python 3.3. The function is no more documented: there is an entry in os documentation, but the entry is not in the index, and it has a reference to the "file object creation" section which doesn't have an paragraph about os.popen().

I prefer subprocess.Popen() over os.popen() because subprocess has much more options to control the child process creation (eg. change the current directory), it closes all files by default (which is more secure), it restores the signal handlers, etc.

I don't know if we can directly remove os.popen() from Python 3.3, because it is no more marked as deprecated in Python 3!

components: Library (Lib)
messages: 129955
nosy: haypo
priority: normal
severity: normal
status: open
title: Deprecate, remove or document (correctly) os.popen
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list