Python communication code for the hashbot