Ported to Python 3.3

BTW, I had to change the testing strategy. See tests.py for details.
Preparing release 4.0.0
Back to development: 4.0.1