Python 3.2 Compatibility

tested example with Python 2.7.2 and 3.2.3