1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Python の 2to3 で一気に変換メモ

Posted at

Windows 10 で python の変換ツール 2to3.exe を動かしてみました。

2to3.bat
@echo off
set PATH=%Python3のパス%\Scripts;%PATH%
set CNV=2to3.exe
set OPT=-w
set LOG=.\2to3.log

for /r ".\" %%A in (*.py) do %CNV% %OPT% %%A

を変換対象のフォルダに配置し、2to3.bat > 2to3.log 2>&1で実行します。

変換前のファイルは、*.py.bak で保存されていました。

今回は、ここまでです。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?