classification
Title: Deprecate, remove or document (correctly) os.popen
Type: Stage:
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: Neil Muller, vstinner
Priority: normal Keywords:

Created on 2011-03-03 11:29 by vstinner, last changed 2011-03-03 11:36 by vstinner. This issue is now closed.

Messages (2)
msg129955 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-03-03 11:29
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!
msg129956 - (view) Author: Neil Muller (Neil Muller) Date: 2011-03-03 11:33
See issue6490 , which covers much of the same ground.
History
Date User Action Args
2011-03-03 11:36:44vstinnersetstatus: open -> closed
resolution: duplicate
2011-03-03 11:33:30Neil Mullersetnosy: + Neil Muller
messages: + msg129956
2011-03-03 11:29:08vstinnercreate