Hey, I would like to launch the REPL from a script in order to have an interactive session at a point of execution of my Julia program.
Base._start()
start the REPL, but after that, the program is stuck in the loop of the REPL without having the control on it.
If I call the Base._start()
from the REPL, I get a new working REPL. Instantiated variables from the first REPL are still reachable in the second one.
can a script launch a new window terminal with a REPL inside?
1 Like
@Gyslain Have you found a solution?
EDIT: also looking for such a thing
Use Base.run_repl(Base.active_repl)
to call REPL anywhere, and enter CTRL+D to leave the (sub-) REPL.
1 Like
Is there a way to do it in recent versions?
Base.run_repl
does not exist.
julia> using REPL
help?> REPL
search: REPL replace replace!
Run Evaluate Print Loop (REPL)
Example minimal code
import REPL
term = REPL.Terminals.TTYTerminal("dumb", stdin, stdout, stderr)
repl = REPL.LineEditREPL(term, true)
REPL.run_repl(repl)
1 Like