REPL Save/restore

You can do

using JLD2
@save "foo.h5"

to save all of the variables in the interactive scope to a file foo.h5 and

using JLD2
# ...load other packages and struct definitions first...
@load "foo.h5"

to restore them in another session. (It doesn’t save certain things like functions and struct definitions, but those you can easily re-load.)

5 Likes