I'm maintaining a Perforce server via a Unix executable which logs the errors in the terminal whenever something happens to it. What I would like to do is use Python to start the executable, and then have it watch for any errors being logged in the terminal window from the application it's executing.
The following code works for execution, but I have no idea how to get data back from the subprocess when it gets logged to the terminal via some form of callback.
import subprocess
subprocess.call(["./p4d"])