79761432

Date: 2025-09-11 02:32:46
Score: 2
Natty:
Report link

With some helpful discussions from the folks in the comments and this similar question, I believe I have found a solution (perhaps not the best solution).

In the src/lib_name/__init__.py file, if I include:

import lib_name.lib_name
from . import file1, file2

Then in a Jupyter notebook, I import the lib as follows:

from lib_name.lib_name import func
func()  # Call the function.

This seems to resolve the name space error I mentioned above.

However, what I still don't understand:

Any insights on these questions, or recommendations on improving the answer, would still be greatly appreciated.

Reasons:
  • Blacklisted phrase (1): appreciated
  • Blacklisted phrase (0.5): I need
  • RegEx Blacklisted phrase (0.5): Why is this
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: GBean