Package-specific import hooks in Python
问题 I'm working on creating a Python module that maps API provided by a different language/framework into Python. Ideally, I would like this to be presented as a single root package that exposes helper methods, and which maps all namespaces in that other framework to Python packages/modules. For the sake of convenience, let's take CLR as an example: import clr.System.Data import clr.System.Windows.Forms Here clr is the magic top-level package which exposes CLR namespaces System.Data and System