python - 如何将 Python 3 转换为 Python 2 代码?

标签 python python-3.x

我曾用 Python 3 编写过一个程序,但现在想将其转换为 Python 2 代码。是否有任何实用程序可以自动执行此操作?

最佳答案

你想要3to2为此。

关于python - 如何将 Python 3 转换为 Python 2 代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2533217/

相关文章:

python - pybind11 与 numpy 的矩阵乘积

python - 为什么这个 for 循环给我一个不正确的输出?

python - 在 if 语句条件中使用 "or"

python - Tensorflow tfrecords 不允许设置形状?

python - Socketswift 连接到特定 IP 地址超时

python - 在 Python 3 中增加字节数组?

html - Python3.5 BeautifulSoup4 从div中的 'p'获取文本

python - AWS Lambda RDS MySQL 数据库连接接口(interface)错误

python - 无法使用 camera.resolution of picamera 设置分辨率

python - 类型提示列表的子类