I am executing Maple from Python and would like to stop the program if it exceeds a maximum time. If its a Python function this can be done by using a timeout-decorator. But I a
You can use subprocess.Popen to spawn a child process. Make sure to handle stdout and stderr properly. Then use Popen.wait(timeout) call and kill the process when TimeoutExpired arrive.