I am running a Julia script, but would like to have the interpreter keep itself open after the script is executed.
E.g. when I run julia example.jl
, I'd like the script to run and the interpreter to stay open after that, so I can experiment with the results.
Is this possible?
Thanks!
Alternatively, you can just use the -i
(interactive) flag. See julia --help
for more details.
julia -i example.jl
Note, though, that the REPL won't start if the script errors.
Open up the REPL from the shell with julia
and run your code from there with:
include("example.jl")
This will execute your file from the REPL and will allow you play around with your results. If you want to learn more, I recommend this tutorial which is simple and easy to follow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With