source: trunk/essentials/dev-lang/python/Lib/commands.py@ 3393

Last change on this file since 3393 was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 2.2 KB
Line 
1"""Execute shell commands via os.popen() and return status, output.
2
3Interface summary:
4
5 import commands
6
7 outtext = commands.getoutput(cmd)
8 (exitstatus, outtext) = commands.getstatusoutput(cmd)
9 outtext = commands.getstatus(file) # returns output of "ls -ld file"
10
11A trailing newline is removed from the output string.