Make HPaste work with python3