Heim  >  Fragen und Antworten  >  Hauptteil

python3.x – So konvertieren Sie Python3.4-Programme in Python2.7

So konvertieren Sie Python3.4-Programme in Python2.7, nicht Python2.7 in Python3

滿天的星座滿天的星座2686 Tage vor987

Antworte allen(2)Ich werde antworten

  • 我想大声告诉你

    我想大声告诉你2017-06-12 09:28:55

    Python 3 转成Python 2,安装 3to2

    安装: pip install 3to2, 运行: 3to2 file.py, 具体怎么用 看3to2 --help

    Antwort
    0
  • 漂亮男人

    漂亮男人2017-06-12 09:28:55

    要将Python3转换为Python2,一般情况下可以使用3to2,当然也可以借助一些类似six的模块实现兼容2的方式。而更多情况下,需要开发人员自己操作。
    一般情况下都是2升级到3,很少情况下会从3降级到2的。

    Antwort
    0
  • StornierenAntwort