With Julia, submodules are present in support of the packaged module's 
purpose.  If the submodule is in a separate file and the package module 
include()s the submodule's file, it is read.  If the submodule is in the 
same file as the other module and it really is a submodule, then it is 
enclosed within the other module, so it is read as part of reading the 
other module.  Otherwise it is not a submodule, it would be a separate 
module. If a separate module is in a separate file, it is separately 
readable; if not, whether you 'use' it or not Julia will have read it so 
that it can be imported.

This should not be a problem.  What is your concern?

On Wednesday, February 24, 2016 at 3:45:50 PM UTC-5, Cedric St-Jean wrote:
>
> In Python, loading a module (i.e. importing a file) does not load 
> sub-modules, eg.:
>
> import sklearn
> import sklearn.linear_model
>
> Is there any way to achieve the same thing in Julia?
>
> module A
> println("loaded A")
>
> module B
> println("loaded B")
> end
>
> end
>
> Can I have "loaded A" without "loaded B"?
>

Reply via email to