A bug in commands.getstatus?

Quinn Dunkan quinn at quetzal.ugcs.caltech.edu
Sat Jan 20 00:36:59 EST 2001


On Fri, 19 Jan 2001 23:53:04 -0500, Roy Katz <katz at Glue.umd.edu> wrote:
>Recently I noticed that commands.getstatus() does not accept any
>parameters I give it -- even when its sister functions getstatusoutput() 
>and getoutput() are happy:
>
>
>23:48:15 [foxglove at foxglove foxglove]$ py
>Python 2.0 (#1, Oct 16 2000, 18:10:03) 
>[GCC 2.95.2 19991024 (release)] on linux2
>Type "copyright", "credits" or "license" for more information.
>
>>>> import commands
>>>> commands.getstatus('ls')
>
> 'ls: ls: No such file or directory'
>
>>>> commands.getstatusoutput('ls .')
>(0, '')
>
>>>> commands.getoutput('ls .')
>''
>
>
>what is going on here??

Only what you asked it to do.  Try reading the documentation?

>>> print commands.getstatus.__doc__
Return output of "ls -ld <file>" in a string.

Granted, it's a weird name for a function that doesn't seem very useful, but
it _is_ documented.



More information about the Python-list mailing list