jeffh/sniffer — pull request #11 by wharris (2013-07-04 12:34:17+00:00)
Title: Support Python 3.3.

This commit makes sniffer compatible with Python 3 while retaining compatibility with 2.6 and 2.7. With this change, sniffer was incredibly helpful while porting one of my own projects.

I've tested the basics (running a bunch of nose tests with and without pyinotify/fsevents) with Python 2.6 on Debian, 2.7 on Debian, 3.2 on Debian, 2.7 on OS X, and 3.3 on OS X. I haven't had a chance to test on Windows yet. I've used `from __future__ import print_function`, which is only available in Python 2.6 or newer, but it would be possible to port to Python 2.5 by using `sys.`(`stdout`|`stderr`)`.write` or some sort of compatibility hack.