mirror of https://github.com/CrimsonTome/tldr.git
2to3: add French translation (#7633)
parent
303e2ef2c6
commit
b33bff1585
|
@ -0,0 +1,32 @@
|
|||
# 2to3
|
||||
|
||||
> Conversion automatisé de code python 2 vers 3.
|
||||
> Plus d'informations : <https://docs.python.org/3/library/2to3.html>.
|
||||
|
||||
- Afficher les changements qui seront effectués sans les effectuer (coup d'essai) :
|
||||
|
||||
`2to3 {{chemin/vers/fichier.py}}`
|
||||
|
||||
- Convertir un fichier Python 2 en Python 3 :
|
||||
|
||||
`2to3 --write {{chemin/vers/fichier.py}}`
|
||||
|
||||
- Convertir des fonctionnalités spécifiques de Python 2 vers Python 3 :
|
||||
|
||||
`2to3 --write {{chemin/vers/fichier.py}} --fix={{raw_input}} --fix={{print}}`
|
||||
|
||||
- Convertir toutes les fonctionnalités de Python 2 vers Python 3 sauf exceptions spécifiques :
|
||||
|
||||
`2to3 --write {{chemin/vers/fichier.py}} --nofix={{has_key}} --nofix={{isinstance}}`
|
||||
|
||||
- Afficher une liste de toutes les fonctionnalités de language qui peuvent être converties de Python 2 vers Python 3 :
|
||||
|
||||
`2to3 --list-fixes`
|
||||
|
||||
- Convertir tous les fichier Python2 vers Python 3 dans un dossier :
|
||||
|
||||
`2to3 --output-dir={{chemin/vers/dossier_python3}} --write-unchanged-files --nobackups {{chemin/vers/dossier_python2}}`
|
||||
|
||||
- Executer 2to3 avec plusieurs fil d'exécution :
|
||||
|
||||
`2to3 --processes={{4}} --output-dir={{chemin/vers/dossier_python3}} --write --nobackups --no-diff {{chemin/vers/dossier_python2}}`
|
Loading…
Reference in New Issue