I like the idea and I am very much against ugliness...however:
d = local_import('a.b.c')
is way uglier in my book than:
import a.b.c as d
Asthetics aside, it does not solve the original problem very well.
The problem is not being able to do:
import c as d
when d is in apps/init/modules because sys.path is global.
A much better solution is to change local_import to be just this:
d = local_import('c')
Because you are in an app the 'a.b' part is assumed.
Also, I like the ", force=True" part, but call it "reload" instead
since that better describes what it does, otherwise, "what the heck
are we forcing?" is a valid question.
If you need a patch for this, let me know. I don't mind.
Just my 22222c,
-tim