JuliaPy / JuliaPy/PyCall.jl

Control-C exits Julia after pylab.plot()

Aperta
#35 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
1.5k
Fork
186
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

After the wx event loop gets started, SIGINT kills the Julia repl instead of interrupting the currently executing command. To reproduce:

``` julia
julia> using PyCall

julia> @pylab

julia> pylab.plot(1);
```

At this point, if I close the plot and press ^C, Julia exits.

In the IPython source, it says that [wx resets the SIGINT handler when it's loaded](https://github.com/ipython/ipython/blob/master/IPython/lib/inputhookwx.py#L120), so I tried running `ccall(:jl_install_sigint_handler, Void, ())` the first time `app.o != pynothing` in [gui.jl](https://github.com/stevengj/PyCall.jl/blob/master/src/gui.jl#L98). This is an improvement, in that ^C now works if something is running, but something is still off, since ^C without anything running exits Julia instead of returning to the prompt.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.