learningequality/ka-lite — pull request #664 by bcipolli (2013-09-07 17:40:54+00:00)
Title: small fix to address bug, migrating to cleaner interface using inspect

@jamalex another for you--your code that pretty much others are unaware of. If you don't have time to merge, I may simply merge, as this causes the project to be a non-starter on some OS's / installs (based on install-specific ordering of files, perhaps)

Issues:
We've been seeing cryptic import errors here and there (hi @dylanjbarth , @gimick). With a bit of investigation, we found that it's due to our convenient `import_all_from` function is importing private guts from it's children (`__file__`, `__module`, etc), not just public guts.

(This was a two line change.)

While I was in there, I found that it's easy to get the same functionality without having to pass any parameters, or duplicate any logic (by using inspect, available since Python 2.1--so OK for us). So, I used it! That's where the rest of this churn comes from.

Changes:
* Fix the major problem by skipping imports of anything starting with "_"
* Add a wrapper function around `import_all_from` that requires no params
* Use that function wherever we were using `import_all_from`