Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch keyboard interrupts during Python execution #27

Open
stevengj opened this issue Jul 18, 2013 · 4 comments
Open

catch keyboard interrupts during Python execution #27

stevengj opened this issue Jul 18, 2013 · 4 comments

Comments

@stevengj
Copy link
Member

Currently, keyboard interrupts are deferred during execution of Python code, since CPython is not interrupt-safe. It would be nice to catch these interrupts and set a KeyboardInterrupt Python exception so that Python code is halted gracefully.

@StephenVavasis
Copy link

Currently (Windows 8.1, Julia 0.4.5, PyCall 1.6.1, PyPlot 2.1.1) I see the opposite problem. Once my Julia program starts making PyPlot calls, then ctrl-c is no longer able to interrupt the running Julia program until it reaches the next PyPlot invocation.

@damiendr
Copy link

damiendr commented Mar 1, 2018

Agreed that this would be nice. In my case this mostly bites in combination with IJulia -- if I accidentally ask PyPlot to draw something that takes forever, the only way to interrupt it is to restart the notebook (and lose all the previous results).

@athre0z
Copy link

athre0z commented Oct 3, 2019

This is also my primary reason for annoyance in this otherwise excellent library, also while working in IJulia. If this is reasonably easy to implement, that would be greatly appreciated!

@Quantisan
Copy link

related discussion over at PythonCall JuliaPy/PythonCall.jl#219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants