import-hooks

PEP 302 Example: New Import Hooks

Where can I find an example implementation of the "New Import Hooks" described in PEP 302? I would like to implement a custom finder and loader in the most forward compatible way possible. In other words, the implementation should work in python 2.x and 3.x. ...

importing same module more than once

So after a few hours, I discovered the cause of a bug in my application. My app's source is structured like: main/ __init__.py folderA/ __init__.py fileA.py fileB.py Really, there are about 50 more files. But that's not the point. In main/__init__.py, I have this code: from folderA.fileA import * in f...