Is os.popen really deprecated in Python 2.6?

一曲冷凌霜 提交于 2019-12-05 05:36:09

Here is the PEP.

Deprecated modules and functions in the standard library:

    - buildtools
    - cfmfile
    - commands.getstatus()
    - macostools.touched()
    - md5
    - MimeWriter
    - mimify
    - popen2, os.popen[234]()
    - posixfile
    - sets
    - sha

one thing that I can think of is that os.popen exists in python3, while os.popen2 doesn't. So one is "more deprecated" than the other, and scheduled for sooner removal from the language.

In the meanwhile I have opened a ticket on the Python issue tracker. I'll keep this question open until the ticket is closed.

commands.getstatusoutput still uses it according to the 2.6.4 documentation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!