pytevent: Port to Python 3