Python namespace packages: can the main package give information when importing a subpackage fails
I have a python namespace package (which allows subpackages of a main package to be in separate directories on disk: peps.python.org/pep-0420): main-package/ python/ mynspack/ common/ commonfunctions.py Which provides import mynspack, from mynspack import common. I have other subpackages of mynspack elsewhere: other-library/ python/ mynspack/ additional/ additionalfunctions.py Which allows users to from mynspack import additional. Now if other-library is not installed, users attempting the second import will see ImportError: mynspack has no module additional. I would like it if I could do some
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.