This problem periodically comes up, and generally an unsatisfactory solution is proposed, the cure is worse than the disease, it's rejected, and we ignore the problem for another year.
The 1:1 correspondence of modules to files in Python is handy, but sometimes inconvenient. I would like to be able to write large, complex packages in Python but constrain the interface that they present, so that users only have to import one module in order to use them.
What is a good way to do this?
April end-month report
2 weeks ago
2 comments:
A top-level module which imports the package and exports the public interfaces?
The py library has a homegrown mechanism for exposing a namespace that is distributed among various modules. See http://codespeak.net/svn/py/dist/py/__init__.py
Grig
Post a Comment