jeffh/sniffer — pull request #12 by wharris (2013-07-10 14:19:08+00:00)
Title: Fix imports for distribution install.

This commit fixes sniffer after I broke it in commit 4c5afaf9d792d9e3125c1fdadcb20f22a867fb6c.

Since commit 4c5afaf9d792d9e3125c1fdadcb20f22a867fb6c, running sniffer after installing via pip results in an import error due to leftover relative imports. I created created and tested that commit by running `python $PATH_TO_SNIFFER/sniffer/main.py` directly, which allowed some imports to succeed in testing, but fail when sniffer is run from an installed distribution.

This commit fixes the error by correcting the remaining old-style imports in runner.py and main.py. The imports in main.py are made absolute so sniffer can still be run locally during development.

I've tested this by installing sniffer with `pip install https://github.com/wharris/sniffer/archive/fix_imports.zip` and then running `sniffer` (not by running sniffer/main.py directly).