Stream: helpdesk (published)

Topic: ✔ Run Julia REPL within anonymous module


view this post on Zulip Timothy (Mar 06 2023 at 17:11):

I've created an anonymous module (mod) and I'm trying to run a Julia REPL in it over a socket (conn), however it doesn't seem to be working :frowning:.

Core.eval(mod, quote
  term = REPL.Terminals.TTYTerminal(
      get(ENV, "TERM", Sys.iswindows() ? "" : "dumb"),
      $conn, $conn, $conn)
  repl = REPL.LineEditREPL(term, true)
  REPL.run_repl(repl) end)

When I replace Core.eval(mod, ....) with eval(...), it works fairly well, but I'm hoping I can do this within the anonymous module.

view this post on Zulip Timothy (Mar 06 2023 at 17:56):

Gah, I missed the obvious! I forgot to require REPL in mod.

view this post on Zulip Notification Bot (Mar 06 2023 at 17:56):

Timothy has marked this topic as resolved.


Last updated: Oct 02 2023 at 04:34 UTC