Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on April 19, 2018 8:10PM
Likes: 0
Replies: 1
Hi,
If you create a project-level python library with the same name as a global-level python library, the global-level will be used. Hence it is best to have different names for python files and/or directory structure at project-level and global-level.
Since you can have a directory structure in these libraries, you can define your own submodule structure to customize the name resolution. For instance, you can create a directory named "global_lib" inside the global python-lib directory. You could then advise users to put all global-level library files inside the former directory. Then from a Python notebook inside a project, they would reference the global module with:
from global_lib.foo import bar
Cheers,
Alex