Use print function
Use default datetime import for Python3
Python3 has different signatures
Some types no longer exist.

- PyString has been replaced by PyBytes.
- PyInt is now PyLong
- PyFileObject no longer exists, everything is now in the io module, I
  don't know what the correct checks are, so they are no-oped now.
Improve Python detection to handle Python3.

To choose which Python module to build, just set USE_PYTHON cmake option
to whatever Python version you want to use. Not sure that still works if
you set it to 2 and the default Python is Python3.