Python 3 compatibility

Hello.
This pull request adds compatibility with Python versions (only) 2.6, 2.7, 3.2, 3.3, 3.4.
It passes all the tests on this interpreters (could be checked using `tox`), all examples are working and everything seems to be ok.