mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 06:42:10 +02:00
2to3: add Spanish translation (#9693)
* 2to3: add Spanish translation * Update pages.es/common/2to3.md
This commit is contained in:
parent
f8a527b837
commit
c8342ccee8
1 changed files with 32 additions and 0 deletions
32
pages.es/common/2to3.md
Normal file
32
pages.es/common/2to3.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# 2to3
|
||||
|
||||
> Conversión automatizada de código Python 2 a 3.
|
||||
> Más información: <https://docs.python.org/3/library/2to3.html>.
|
||||
|
||||
- Muestra los cambios que se realizarían sin realizarlos (simulacro):
|
||||
|
||||
`2to3 {{ruta/a/archivo.py.py}}`
|
||||
|
||||
- Convierte un archivo Python 2 a Python 3:
|
||||
|
||||
`2to3 --write {{ruta/a/archivo.py}}`
|
||||
|
||||
- Convierte funciones específicas del lenguaje Python 2 a Python 3:
|
||||
|
||||
`2to3 --write {{ruta/a/archivo.py}} --fix={{raw_input}} --fix={{print}}`
|
||||
|
||||
- Convierte todas las funciones del lenguaje Python 2 excepto las especificadas a Python 3:
|
||||
|
||||
`2to3 --write {{ruta/a/archivo.py}} --nofix={{has_key}} --nofix={{isinstance}}`
|
||||
|
||||
- Muestra una lista de todas las características disponibles del lenguaje que se pueden convertir de Python 2 a Python 3:
|
||||
|
||||
`2to3 --list-fixes`
|
||||
|
||||
- Convierte todos los archivos Python 2 en un directorio a Python 3:
|
||||
|
||||
`2to3 --output-dir={{ruta/a/directorio_python3}} --write-unchanged-files --nobackups {{ruta/a/directorio_python2}}`
|
||||
|
||||
- Ejecuta 2to3 con varios subprocesos:
|
||||
|
||||
`2to3 --processes={{1..infinity}} --output-dir={{ruta/a/directorio_python3}} --write --nobackups --no-diff {{ruta/a/directorio_python2}}`
|
Loading…
Add table
Reference in a new issue