This tested OK at some time for Python 2/3 compatibility. Here's another try that tested OK with 2.7 and 3.3.