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!
I think what the OP is trying to ask is:
How do you Open a Pluto Notebook and then disable the Safe Preview without running the entire notebook?
I face this problem too! I want to run the cells one-by-one and follow through the notebook, instead of it being run fully at the start.
Any help or suggestions are appreciated
You can go through the cells and disable them, turn off safe mode, and then reenable them one-by-one.
Note that a key feature of Pluto notebooks is that they don’t have to be linear, so you might not be able to tell what order to reenable the cells especially if the notebook has any in-place mutations of an object.
However, since the result of each cell is printed out, I’m not sure what running cells one-by-one does pedagogically. You can just let it run and then read through the results, no?