I'm running my app on Google App Engine.
I put an extension (flask-lazyviews) in flask.ext and then import it, then an import error appears "No module named flask.ext.lazy.werkzeug".
Of course it's not the extension's fault, because it just "from werkzeug.xx import xx", nothing's wrong with it.
And if I disable the import hook in flask.ext.init.py, everything works, the import works, no problem whatsoever.
I read the code of the import hook (in exthook.py), apparently it's raising an exception because it cannot import the module from some paths.
I think it's not a valid behavior, how could it account for every possible path that the environment provides? It CANNOT! On Google App Engine there's a mysterious import path automatically added by some way (the application folder).
It should not raise an error.
note: the example in PEP 302 doesn't raise an error.
You are not supposed to drop anything into that folder. It's a virtual folder to enable updates.