bertdv/AIP-5SSB0

cannot quit `interactive_em_demo.jl` by ctrl-c

bertdv opened this issue · 2 comments

The demo interactive_em_demo.jl in lesson 9 is super but I cannot quit by ctrl-c, see below.

julia> include("interactive_em_demo.jl")
Press [enter] for E-step or ctrl+c to quit
Press [enter] for M-step or ctrl+c to quit
Press [enter] for E-step or ctrl+c to quit
Press [enter] for M-step or ctrl+c to quit
Press [enter] for E-step or ctrl+c to quit
Press [enter] for M-step or ctrl+c to quit
Press [enter] for E-step or ctrl+c to quit
Press [enter] for M-step or ctrl+c to quit
Press [enter] for E-step or ctrl+c to quit
Press [enter] for M-step or ctrl+c to quit
Press [enter] for E-step or ctrl+c to quit
Press [enter] for M-step or ctrl+c to quit
Press [enter] for E-step or ctrl+c to quit
Press [enter] for M-step or ctrl+c to quit
Press [enter] for E-step or ctrl+c to quit
Press [enter] for M-step or ctrl+c to quit
Press [enter] for E-step or ctrl+c to quit
Press [enter] for M-step or ctrl+c to quit
Press [enter] for E-step or ctrl+c to quit^[^C
Press [enter] for M-step or ctrl+c to quit^C
Press [enter] for E-step or ctrl+c to quit
Press [enter] for M-step or ctrl+c to quit

ctrl+c only works from the terminal. So you should invoke the script like:

julia interactive_em_demo.jl

However, I've changed the script so you can now quit by typing q, which also works from the Julia REPL.

great, thx