2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation (#10603)
* 2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation
---------
Co-authored-by: mortalpuppet <misagh.sj@mgail.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-09-14 16:31:28 +01:00
|
|
|
# 2to3
|
|
|
|
|
|
|
|
> تبدیل خودکار کد پایتون نسخه 2 به 3
|
|
|
|
> اطلاعات بیشتر: <https://docs.python.org/3/library/2to3.html>.
|
|
|
|
|
|
|
|
- نمایش تغییرات که در حال حاضر انجام میشود بدون اجرای آن (dry-run) :
|
|
|
|
|
2024-01-05 10:18:59 +00:00
|
|
|
`2to3 {{path/to/file.py}}`
|
2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation (#10603)
* 2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation
---------
Co-authored-by: mortalpuppet <misagh.sj@mgail.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-09-14 16:31:28 +01:00
|
|
|
|
|
|
|
- تبدیل فایل پایتون نسخه 2 به 3 :
|
|
|
|
|
2024-01-05 10:18:59 +00:00
|
|
|
`2to3 --write {{path/to/file.py}}`
|
2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation (#10603)
* 2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation
---------
Co-authored-by: mortalpuppet <misagh.sj@mgail.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-09-14 16:31:28 +01:00
|
|
|
|
|
|
|
- تبدیل قابلیت های خاص پایتون نسخه 2 به 3 :
|
|
|
|
|
2024-01-05 10:18:59 +00:00
|
|
|
`2to3 --write {{path/to/file.py}} --fix={{raw_input}} --fix={{print}}`
|
2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation (#10603)
* 2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation
---------
Co-authored-by: mortalpuppet <misagh.sj@mgail.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-09-14 16:31:28 +01:00
|
|
|
|
|
|
|
- تبدیل تمامی قابلیت های نسخه 2 به 3 بغیر از ویژگی های معیین شده :
|
|
|
|
|
2024-01-05 10:18:59 +00:00
|
|
|
`2to3 --write {{path/to/file.py}} --nofix={{has_key}} --nofix={{isinstance}}`
|
2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation (#10603)
* 2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation
---------
Co-authored-by: mortalpuppet <misagh.sj@mgail.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-09-14 16:31:28 +01:00
|
|
|
|
|
|
|
- نمایش لیست قابلیت های زبان پایتون نسخه 2 که قابلیت تبدیل به نسخه 3 را دارند :
|
|
|
|
|
|
|
|
`2to3 --list-fixes`
|
|
|
|
|
|
|
|
- تبدیل تمامی فایل های پایتون نسخه 2 به 3 در یک مسیر :
|
|
|
|
|
2024-01-05 10:18:59 +00:00
|
|
|
`2to3 --output-dir={{path/to/python3_directory}} --write-unchanged-files --nobackups {{path/to/python2_directory}}`
|
2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation (#10603)
* 2to3, 7za, 7zr, [, [[, android/*: add Farsi Translation; 7z: update Farsi Translation
---------
Co-authored-by: mortalpuppet <misagh.sj@mgail.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-09-14 16:31:28 +01:00
|
|
|
|
|
|
|
- اجرای همزان(چند رشته ای) دستور 2 به 3 :
|
|
|
|
|
2024-01-05 10:18:59 +00:00
|
|
|
`2to3 --processes={{4}} --output-dir={{path/to/python3_directory}} --write --nobackups --no-diff {{path/to/python2_directory}}`
|