Files
tldr/pages.fa/common/2to3.md
K.B.Dharun Krishna 3a37343e59 pages.{ar,fa}: remove translated placeholders (#11997)
* pages.{ar,fa}: remove translated placeholders

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* common-arguments: reword note

* rmdir: fix Arabic translation

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

---------

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-01-05 15:48:59 +05:30

33 lines
1.3 KiB
Markdown

# 2to3
> تبدیل خودکار کد پایتون نسخه 2 به 3
> اطلاعات بیشتر: <https://docs.python.org/3/library/2to3.html>.
- نمایش تغییرات که در حال حاضر انجام میشود بدون اجرای آن (dry-run) :
`2to3 {{path/to/file.py}}`
- تبدیل فایل پایتون نسخه 2 به 3 :
`2to3 --write {{path/to/file.py}}`
- تبدیل قابلیت های خاص پایتون نسخه 2 به 3 :
`2to3 --write {{path/to/file.py}} --fix={{raw_input}} --fix={{print}}`
- تبدیل تمامی قابلیت های نسخه 2 به 3 بغیر از ویژگی های معیین شده :
`2to3 --write {{path/to/file.py}} --nofix={{has_key}} --nofix={{isinstance}}`
- نمایش لیست قابلیت های زبان پایتون نسخه 2 که قابلیت تبدیل به نسخه 3 را دارند :
`2to3 --list-fixes`
- تبدیل تمامی فایل های پایتون نسخه 2 به 3 در یک مسیر :
`2to3 --output-dir={{path/to/python3_directory}} --write-unchanged-files --nobackups {{path/to/python2_directory}}`
- اجرای همزان(چند رشته ای) دستور 2 به 3 :
`2to3 --processes={{4}} --output-dir={{path/to/python3_directory}} --write --nobackups --no-diff {{path/to/python2_directory}}`