How to use 2to3 tool in windows?

前端 未结 2 1348
遥遥无期
遥遥无期 2020-12-14 01:52

I tried to modify the sintax using 2to3 tool by running command

python C:\\Python32\\Tools\\scripts\\2to3.py neo4j.py

and got the output

相关标签:
2条回答
  • 2020-12-14 02:36

    As an addition to the accepted answer,

    Copy this line to C:\python32\Scripts\2to3.bat:

    @python %~dp0..\tools\scripts\2to3.py %*
    

    After that you'll be able to use

    2to3 -w neo4j.py
    
    0 讨论(0)
  • 2020-12-14 02:40

    You have to use the -w flag to actually write the changes:

    python C:\Python32\Tools\scripts\2to3.py -w neo4j.py
    

    See the 2to3.py documentation.

    0 讨论(0)
提交回复
热议问题