1

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).

fozbstuios
  • 373
  • 4
  • 8
  • 17

1 Answers1

1

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.

Ben Darnell
  • 21,844
  • 3
  • 29
  • 50