-
-
Notifications
You must be signed in to change notification settings - Fork 322
Description
Hi,
I wanted to ask for a best practise for including a self-written module MyModule.jl and having all
exported functions (my_function) within the workspace of the Pluto notebook available instead of MyModule.my_function
Workaround would be of course to create a package.
But relating to #115 it would be cool to first load the file ingredient("./MyModule.jl") and then use the module with all exported functions.
Interestingly using .MyModule or using .MyModule: my_function is not working.
When using include("MyModule.jl")
using .MyModule is not working but using .MyModule: my_function is working (see video below).
So I thought what about creating a function that loads all my exported functions (names(MyModule)):
function using_local_module(modulename)
return eval(Meta.parse("using " * string(modulename) * """: """ * join(string.(modulname), ", ")))
endbut that does only work in the same cell.
So what is the best way to use a self-written module saved in a file.jl within Pluto?