Can distribute setuptools be used to port packages implemented in python 2 to 3

前端 未结 2 409
一个人的身影
一个人的身影 2021-01-22 23:53

Found some info on porting packages from python 2 to 3 using distribute setuptools in below link.

http://packages.python.org/distribute/python3.html

I have a C

2条回答
  •  一生所求
    2021-01-23 00:31

    distriubte uses Python's 2to3 tool to automatically (try to) convert Python 2 code to Python 3 code. However, that only works for code written in Python. C code needs to be ported by hand.

    The good news is that Python's C API has not changed much between Python 2.6 and 3.1. The main difference is that Python 3 now uses Unicode for all strings and has a separate bytes type for handling raw binary data.

提交回复
热议问题