Exit the safe mode without running the notebook?

Hi,
I want to open a saved a Pluto notebook as a .jl file but not in safe mode. Is it possible?, may I disable the mode once it is opened or somewhere inside the .jl file before open it?
Do something similar to kernel restart (Jupyter) exists in Pluto?

It’s not clear to me what you mean by “open as a .jl but not in safe mode.” A Pluto notebook is a plain text file, so you can open it in any text editor. But “not in safe mode” makes me think you want to run the file. If that’s the case, then you can do the following in the REPL:

using Pluto
p = "path/to/notebook.jl"
Pluto.activate_notebook_environment(p)
include(p)

Which will run the notebook like a script.

Your next question “can I disable the mode” makes me think that both of my answers are not helpful because turning on and off safe mode only makes sense in the context of the Pluto environment. When you open a notebook, it opens in safe mode by default. You can turn that off by clicking the button in the top right. You can turn it on again by clicking the Pluto symbol in the top left, and then, clicking the X next to your notebook name on the Pluto homepage, and then opening the notebook again. This will “restart the kernel” like Jupyter.

Hope this helps!

1 Like