Apparent Python 3 support

Tested with Python 2.6.6 and 3.1.3