amoffat/pbs — pull request #17 by encukou (2012-01-31 01:07:35+00:00)
Title: Do less magic on module import

This replaces the on-import magic with:

* Replacing the module with a wrapper that does lookups, as before,
except unconditionally (so `import pbs.echo` or `from pbs import echo`
works everywhere, even in a REPL).
* Setting `__all__` to a lazily evaluated list of commands on the system,
to support `from pbs import *`.
This is the weakness of this approach: accessing `__all__` for the first
time takes a while, and then it's cached (doesn't reflect added/removed
system commands).

Is the increased robustness worth the worse star-import support?