My Python script will run a bunch of shell scripts that output either 200 SOLUTIONS_REVISION or 400 SOLUTIONS_REVISION when run. The 200 in the output indicates success and the 400 indicates failure.
How can I capture these "returned" strings as strs in the Python code, for further processing?
If you’re going to run the command from your Python script then you want to look at
subprocesswith itsstdoutarguments. If you’re going to run both that script and the Python script from a separate shell script then you want to pipe from one to the next and then read fromsys.stdin.