Python namespace packages: is it possible for 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 per PEP 240): 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 something so that i
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.