Julia - run the script and continue the work of the interpreter

I am running a Julia script, but would like the interpreter to remain open after the script is executed.

eg. when I run julia example.jl , I would like the script to run and the interpreter to remain open after that, so I can experiment with the results.

Is it possible?

Thanks!

+5
source share
2 answers

Alternatively, you can simply use the -i flag (interactive). See julia --help more details.

 julia -i example.jl 

Please note that REPL does not start if script errors.

+7
source

Open REPL from the shell using julia and run your code with:

 include("example.jl") 

This will execute your file from the REPL and allow you to play around with your results. If you want to know more, I recommend this tutorial , which is simple and easy to use.

+5
source

All Articles