I think I understand yor situation a bit better. The advice above, that is to Pkg.add/dev
all the folders applies to standalone packages/projects.
For your filestructure, which I think is a single package, you would instead use submodules.
You can simply include("Module1.jl")
from Main.jl
. Then to access Module1 from Main’s scope, you would do using .Module1
. From Module1 you would do using ..Main
to access names defined in Main. The dots are there to define the scope of the imports.
See Modules · The Julia Language and How to arrange a package with submodules and multiple files? - #6 by Gu_Junhua
I think that should answer your questions. I believe the only difference from Python is that you need to include
the file (prior to doing using/import
), since using
and import
don’t look things up by filename. This does mean you need to make sure you don’t include the same file multiple times.