On 3/13/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > I'd like to deprecate commands.getstatus() in 2.6. > > Reason: there is getoutput() and getstatusoutput(). In the latter, "status" > means the exit code. getstatus(), however, returns the output of "ls -ld > <file>" which is completely nonobvious and confusing.
+1. > Perhaps the whole commands module can be deprecated in favor of subprocess. -1. Reason (for both voteS): I have learned that the getoutput() and getstatusoutput() functions in the commands module are exceedingly popular amongst Googlers who write simple Python scripts that occasionally invoke an external command. It's much simpler than using os.popen() or the subprocess module (which is also very popular BTW). But I have found no uses of commands.getstatus() in our entire codebase so I'm okay with seeing that mistake finally eradicated (and it was *my* mistake :-). -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ 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