from subprocess_util import execute_print_capture def test(): returncode, out, err = execute_print_capture(['ls', '-la']) print() returncode, out, err = execute_print_capture(['ls', '/foo/bar']) if __name__ == '__main__': test()