JuliaPy / PyCall.jl

Package to call Python functions from the Julia language
MIT License
1.46k stars 187 forks source link

Control-C exits Julia after pylab.plot() #35

Open simonster opened 11 years ago

simonster commented 11 years ago

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

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, so I tried running ccall(:jl_install_sigint_handler, Void, ()) the first time app.o != pynothing in gui.jl. 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.

stevengj commented 11 years ago

That's pretty obnoxious; @loladiro,any suggestions?

stevengj commented 11 years ago

Nowadays I default to Qt rather than wx, so that should help a bit.