Remove unnecessary exceptions import for Python 3 compatibility
Use print functions instead of print statements
Some more python 3 porting