You can use subprocess to run the pascal program and capture the output/results. See here http://blog.doughellmann.com/2007/07/pymotw-subprocess.html