Closed GoogleCodeExporter closed 9 years ago
This is a typical issue with Python C extensions. Python can only safely handle
the KeyboardInterrupt exception while it's running Python code, but you're
stuck in a loop inside the C function sim1D_solve.
You can have ctrl+c terminate the Python process by adding this to the top of
your script:
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
But that's obviously not a very good general solution, as it would have the
same effect on interactive sessions where you expect ctrl+c to return you to
the Python prompt.
Original comment by yarmond
on 3 Jul 2012 at 5:16
This is fixed for the Cython module in r2184.
Solving this for the legacy Python module would be much more complicated, and
given that that module is on it's way out, probably not worth the effort.
Original comment by yarmond
on 4 Mar 2013 at 5:38
Original issue reported on code.google.com by
thetruet...@googlemail.com
on 3 Jul 2012 at 12:42