Does this idea help to send a break signal to sympy when it is hanging? https://discourse.julialang.org/t/python-stdout-from-pycall/75036