On Tue, Mar 13, 2007 at 04:55:07PM -0700, Guido van Rossum wrote: -> On 3/13/07, Titus Brown <[EMAIL PROTECTED]> 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, http://docs.python.org/lib/node537.html 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, and (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()'.) cheers, --titus _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com