2to3, 7za, 7zr, [, [[, aapt: add Korean translate (#7970)
This commit is contained in:
32
pages.ko/common/2to3.md
Normal file
32
pages.ko/common/2to3.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# 2to3
|
||||
|
||||
> 파이썬 2 코드를 3으로 자동 변환.
|
||||
> 더 많은 정보: <https://docs.python.org/3/library/2to3.html>.
|
||||
|
||||
- 파일을 변경하지않고, 변경될 내용을 출력 (모의 테스트):
|
||||
|
||||
`2to3 {{경로/파일.py}}`
|
||||
|
||||
- 파이썬 2 파일을 3 파일로 변경:
|
||||
|
||||
`2to3 --write {{경로/파일.py}}`
|
||||
|
||||
- 특정 파이썬 2 기능을 파이썬 3로 변경 (아래는 raw_input과 print를 수정하는 예):
|
||||
|
||||
`2to3 --write {{경로/파일.py}} --fix={{raw_input}} --fix={{print}}`
|
||||
|
||||
- 특정 기능을 제외한 모든 파이썬 2 기능을 파이썬 3로 변경:
|
||||
|
||||
`2to3 --write {{경로/파일.py}} --nofix={{has_key}} --nofix={{isinstance}}`
|
||||
|
||||
- 파이썬 2 에서 파이썬 3 로 변환할 수 있는 목록을 출력:
|
||||
|
||||
`2to3 --list-fixes`
|
||||
|
||||
- 디렉토리 안의 모든 파이썬 2 파일을 파이썬 3로 변경:
|
||||
|
||||
`2to3 --output-dir={{파이썬3/디렉토리/경로}} --write-unchanged-files --nobackups {{파이썬2/디렉토리/경로}}`
|
||||
|
||||
- 2to3을 멀티쓰레드로 실행:
|
||||
|
||||
`2to3 --processes={{4}} --output-dir={{파이썬3/디렉토리/경로}} --write --nobackups --no-diff {{파이썬2/디렉토리/경로}}`
|
Reference in New Issue
Block a user