On Tue, Mar 13, 2007 at 02:16:21PM -0700, Guido van Rossum wrote: -> On 3/13/07, Georg Brandl <g.brandl at gmx.net> 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). What about reimplementing commands.* using subprocess? Or providing a commands.*-compatible interface in the subprocess module? cheers, --titus
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4