Python 3 full compatibility + more flexible hosts configuration

Hey,

I made some basic Python 3 compatibility changes, if you can accept them and update PyPi it would be great for everyone :)

I also included a minor configuration change that makes hosts configuration more granular.