Running a Subprocess from Python and Capturing the Output and Errors

This post is more of a "scratchpad" post than anything else. I wanted to try a different method of running racket code that did not include docker. After some experimenting, I came up with the following Python code:

import subprocess

output =["racket", "a6q1_solution.rkt"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)


Everything in Python is quick and easy. It is unclear which method I will be utilizing to run the code but this certainly looks clean and simple.