pybing port to Python 3