[Python-Dev] deprecate commands.getstatus()
titus at caltech.edu
Wed Mar 14 04:14:00 CET 2007
On Tue, Mar 13, 2007 at 04:55:07PM -0700, Guido van Rossum wrote:
-> On 3/13/07, Titus Brown <titus at caltech.edu> wrote:
-> > What about reimplementing commands.* using subprocess? Or providing a
-> > commands.*-compatible interface in the subprocess module?
-> What does that buy us?
The simplicity of the commands interface on top of the more functional
subprocess interface, no? subprocess is very powerful but there isn't
a simple way to get the output.
See http://docs.python.org/lib/node530.html, and see the docs comparing
os.system() with subprocess,
So, if you added 'getstatusoutput' and 'getoutput'-style commands to the
subprocess module, you would
(a) be able to deprecate a module in the stdlib, simplifying it a bit,
(b) provide simple commands implementing a common use case for subprocess,
"run this command and give me the output". (You can already
do 'getstatus' with a 'Popen(cmd).wait()'.)
More information about the Python-Dev