sample_python_subprocess32.py 159 B

123456
  1. import subprocess32
  2. output = subprocess32.check_output(["ls", "-l", "/dev/null"])
  3. print(output)
  4. assert("/dev/null" in output)
  5. assert("No such" not in output)