Python3

Adding python3 support for the daemon code.