我们从Python开源项目中,提取了以下8个代码示例,用于说明如何使用commands.getstatus()。
def getstatus(file): """Return output of "ls -ld <file>" in a string.""" import warnings warnings.warn("commands.getstatus() is deprecated", DeprecationWarning, 2) return getoutput('ls -ld' + mkarg(file)) # Get the output from a shell command into a string. # The exit status is ignored; a trailing newline is stripped. # Assume the command will work with '{ ... ; } 2>&1' around it.. #