문제

Ok. so I know 2to3 only provides a dif list. However, 2o3 should modify the actual file right? when I run this command with -w it gives me a dif list. The file is not changed (it is still Tkinter) Also, I sse no backup like 2to3 is supposed to provide.

Edit: I actually did this on a folder. One file in the folder(which was already 3.x) was modified. I put this file in the folder by mistake but the files I wanted we're not changed (though terminal did give me a dif list).

도움이 되었습니까?

해결책

2to3 -w will both replace the files and print the diffs; you need to use --no-diffs to turn off the diff output. 2to3 --no-diffs -w dir/*.py should do the trick.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top