From e6b98c09143cefed8f8e38c8bc734abb888b9138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Sun, 24 Nov 2024 20:17:35 +0100 Subject: [PATCH 1/2] Translate library/pathlib Closes #3001 --- library/pathlib.po | 965 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 753 insertions(+), 212 deletions(-) diff --git a/library/pathlib.po b/library/pathlib.po index 2a5865bfcf..5db6414384 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -11,25 +11,24 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: 2024-10-29 13:06-0600\n" -"Last-Translator: Carlos A. Crespo \n" -"Language: es\n" +"PO-Revision-Date: 2024-11-24 20:12+0100\n" +"Last-Translator: Cristián Maureira-Fredes \n" "Language-Team: python-doc-es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Generated-By: Babel 2.16.0\n" +"X-Generator: Poedit 3.4.2\n" #: ../Doc/library/pathlib.rst:2 -#, fuzzy msgid ":mod:`!pathlib` --- Object-oriented filesystem paths" -msgstr ":mod:`pathlib` --- Rutas de sistemas orientada a objetos" +msgstr ":mod:`!pathlib` --- Rutas de sistemas orientada a objetos" #: ../Doc/library/pathlib.rst:9 -#, fuzzy msgid "**Source code:** :source:`Lib/pathlib/`" -msgstr "**Código fuente:** :source:`Lib/pathlib.py`" +msgstr "**Código fuente:** :source:`Lib/pathlib/`" #: ../Doc/library/pathlib.rst:15 msgid "" @@ -55,6 +54,12 @@ msgid "" "PosixPath subclasses PurePosixPath and Path, and WindowsPath\n" "subclasses PureWindowsPath and Path." msgstr "" +"Diagrama de herencia que muestra las clases disponibles en pathlib. La\n" +"clase más básica es PurePath, que tiene tres subclases directas:\n" +"PurePosixPath, PureWindowsPath y Path. Además de estas cuatro\n" +"clases, hay dos clases que utilizan herencia múltiple:\n" +"subclases de PosixPath, PurePosixPath y Path, y\n" +"subclases de WindowsPath, PureWindowsPath y Path." #: ../Doc/library/pathlib.rst:31 msgid "" @@ -116,7 +121,7 @@ msgstr "Importar la clase principal::" #: ../Doc/library/pathlib.rst:57 msgid ">>> from pathlib import Path" -msgstr "" +msgstr ">>> from pathlib import Path" #: ../Doc/library/pathlib.rst:59 msgid "Listing subdirectories::" @@ -129,6 +134,10 @@ msgid "" "[PosixPath('.hg'), PosixPath('docs'), PosixPath('dist'),\n" " PosixPath('__pycache__'), PosixPath('build')]" msgstr "" +">>> p = Path('.')\n" +">>> [x for x in p.iterdir() if x.is_dir()]\n" +"[PosixPath('.hg'), PosixPath('docs'), PosixPath('dist'),\n" +" PosixPath('__pycache__'), PosixPath('build')]" #: ../Doc/library/pathlib.rst:66 msgid "Listing Python source files in this directory tree::" @@ -141,6 +150,10 @@ msgid "" " PosixPath('pathlib.py'), PosixPath('docs/conf.py'),\n" " PosixPath('build/lib/pathlib.py')]" msgstr "" +">>> list(p.glob('**/*.py'))\n" +"[PosixPath('test_pathlib.py'), PosixPath('setup.py'),\n" +" PosixPath('pathlib.py'), PosixPath('docs/conf.py'),\n" +" PosixPath('build/lib/pathlib.py')]" #: ../Doc/library/pathlib.rst:73 msgid "Navigating inside a directory tree::" @@ -155,6 +168,12 @@ msgid "" ">>> q.resolve()\n" "PosixPath('/etc/rc.d/init.d/halt')" msgstr "" +">>> p = Path('/etc')\n" +">>> q = p / 'init.d' / 'reboot'\n" +">>> q\n" +"PosixPath('/etc/init.d/reboot')\n" +">>> q.resolve()\n" +"PosixPath('/etc/rc.d/init.d/halt')" #: ../Doc/library/pathlib.rst:82 msgid "Querying path properties::" @@ -167,6 +186,10 @@ msgid "" ">>> q.is_dir()\n" "False" msgstr "" +">>> q.exists()\n" +"True\n" +">>> q.is_dir()\n" +"False" #: ../Doc/library/pathlib.rst:89 msgid "Opening a file::" @@ -178,17 +201,21 @@ msgid "" "...\n" "'#!/bin/bash\\n'" msgstr "" +">>> with q.open() as f: f.readline()\n" +"...\n" +"'#!/bin/bash\\n'" #: ../Doc/library/pathlib.rst:97 -#, fuzzy msgid "Exceptions" -msgstr "operations" +msgstr "Excepciones" #: ../Doc/library/pathlib.rst:101 msgid "" "An exception inheriting :exc:`NotImplementedError` that is raised when an " "unsupported operation is called on a path object." msgstr "" +"Una excepción que hereda :exc:`NotImplementedError` y que se genera cuando " +"se llama a una operación no compatible en un objeto de ruta." #: ../Doc/library/pathlib.rst:110 msgid "Pure paths" @@ -217,6 +244,8 @@ msgid "" ">>> PurePath('setup.py') # Running on a Unix machine\n" "PurePosixPath('setup.py')" msgstr "" +">>> PurePath('setup.py') # Ejecutándose en una máquina Unix\n" +"PurePosixPath('setup.py')" #: ../Doc/library/pathlib.rst:124 msgid "" @@ -237,6 +266,10 @@ msgid "" ">>> PurePath(Path('foo'), Path('bar'))\n" "PurePosixPath('foo/bar')" msgstr "" +">>> PurePath('foo', 'some/path', 'bar')\n" +"PurePosixPath('foo/some/path/bar')\n" +">>> PurePath(Path('foo'), Path('bar'))\n" +"PurePosixPath('foo/bar')" #: ../Doc/library/pathlib.rst:134 msgid "When *pathsegments* is empty, the current directory is assumed::" @@ -247,6 +280,8 @@ msgid "" ">>> PurePath()\n" "PurePosixPath('.')" msgstr "" +">>> PurePath()\n" +"PurePosixPath('.')" #: ../Doc/library/pathlib.rst:139 msgid "" @@ -263,6 +298,10 @@ msgid "" ">>> PureWindowsPath('c:/Windows', 'd:bar')\n" "PureWindowsPath('d:bar')" msgstr "" +">>> PurePath('/etc', '/usr', 'lib64')\n" +"PurePosixPath('/usr/lib64')\n" +">>> PureWindowsPath('c:/Windows', 'd:bar')\n" +"PureWindowsPath('d:bar')" #: ../Doc/library/pathlib.rst:147 msgid "" @@ -277,6 +316,8 @@ msgid "" ">>> PureWindowsPath('c:/Windows', '/Program Files')\n" "PureWindowsPath('c:/Program Files')" msgstr "" +">>> PureWindowsPath('c:/Windows', '/Program Files')\n" +"PureWindowsPath('c:/Program Files')" #: ../Doc/library/pathlib.rst:153 msgid "" @@ -300,6 +341,14 @@ msgid "" ">>> PurePath('foo/../bar')\n" "PurePosixPath('foo/../bar')" msgstr "" +">>> PurePath('foo//bar')\n" +"PurePosixPath('foo/bar')\n" +">>> PurePath('//foo/bar')\n" +"PurePosixPath('//foo/bar')\n" +">>> PurePath('foo/./bar')\n" +"PurePosixPath('foo/bar')\n" +">>> PurePath('foo/../bar')\n" +"PurePosixPath('foo/../bar')" #: ../Doc/library/pathlib.rst:166 msgid "" @@ -336,6 +385,8 @@ msgid "" ">>> PurePosixPath('/etc/hosts')\n" "PurePosixPath('/etc/hosts')" msgstr "" +">>> PurePosixPath('/etc/hosts')\n" +"PurePosixPath('/etc/hosts')" #: ../Doc/library/pathlib.rst:184 ../Doc/library/pathlib.rst:196 #: ../Doc/library/pathlib.rst:766 ../Doc/library/pathlib.rst:776 @@ -358,6 +409,10 @@ msgid "" ">>> PureWindowsPath('//server/share/file')\n" "PureWindowsPath('//server/share/file')" msgstr "" +">>> PureWindowsPath('c:/', 'Users', 'Ximénez')\n" +"PureWindowsPath('c:/Users/Ximénez')\n" +">>> PureWindowsPath('//server/share/file')\n" +"PureWindowsPath('//server/share/file')" #: ../Doc/library/pathlib.rst:200 msgid "" @@ -393,6 +448,14 @@ msgid "" ">>> PureWindowsPath('C:') < PureWindowsPath('d:')\n" "True" msgstr "" +">>> PurePosixPath('foo') == PurePosixPath('FOO')\n" +"False\n" +">>> PureWindowsPath('foo') == PureWindowsPath('FOO')\n" +"True\n" +">>> PureWindowsPath('FOO') in { PureWindowsPath('foo') }\n" +"True\n" +">>> PureWindowsPath('C:') < PureWindowsPath('d:')\n" +"True" #: ../Doc/library/pathlib.rst:220 msgid "Paths of a different flavour compare unequal and cannot be ordered::" @@ -408,6 +471,13 @@ msgid "" "TypeError: '<' not supported between instances of 'PureWindowsPath' and " "'PurePosixPath'" msgstr "" +">>> PureWindowsPath('foo') == PurePosixPath('foo')\n" +"False\n" +">>> PureWindowsPath('foo') < PurePosixPath('foo')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: '<' not supported between instances of 'PureWindowsPath' and " +"'PurePosixPath'" #: ../Doc/library/pathlib.rst:231 msgid "Operators" @@ -440,6 +510,18 @@ msgid "" ">>> PureWindowsPath('c:/Windows', '/Program Files')\n" "PureWindowsPath('c:/Program Files')" msgstr "" +">>> p = PurePath('/etc')\n" +">>> p\n" +"PurePosixPath('/etc')\n" +">>> p / 'init.d' / 'apache2'\n" +"PurePosixPath('/etc/init.d/apache2')\n" +">>> q = PurePath('bin')\n" +">>> '/usr' / q\n" +"PurePosixPath('/usr/bin')\n" +">>> p / '/an_absolute_path'\n" +"PurePosixPath('/an_absolute_path')\n" +">>> PureWindowsPath('c:/Windows', '/Program Files')\n" +"PureWindowsPath('c:/Program Files')" #: ../Doc/library/pathlib.rst:251 msgid "" @@ -456,6 +538,10 @@ msgid "" ">>> os.fspath(p)\n" "'/etc'" msgstr "" +">>> import os\n" +">>> p = PurePath('/etc')\n" +">>> os.fspath(p)\n" +"'/etc'" #: ../Doc/library/pathlib.rst:259 msgid "" @@ -477,6 +563,12 @@ msgid "" ">>> str(p)\n" "'c:\\\\Program Files'" msgstr "" +">>> p = PurePath('/etc')\n" +">>> str(p)\n" +"'/etc'\n" +">>> p = PureWindowsPath('c:/Program Files')\n" +">>> str(p)\n" +"'c:\\\\Program Files'" #: ../Doc/library/pathlib.rst:270 msgid "" @@ -492,6 +584,8 @@ msgid "" ">>> bytes(p)\n" "b'/etc'" msgstr "" +">>> bytes(p)\n" +"b'/etc'" #: ../Doc/library/pathlib.rst:277 msgid "" @@ -527,6 +621,13 @@ msgid "" ">>> p.parts\n" "('c:\\\\', 'Program Files', 'PSF')" msgstr "" +">>> p = PurePath('/usr/bin/python3')\n" +">>> p.parts\n" +"('/', 'usr', 'bin', 'python3')\n" +"\n" +">>> p = PureWindowsPath('c:/Program Files/PSF')\n" +">>> p.parts\n" +"('c:\\\\', 'Program Files', 'PSF')" #: ../Doc/library/pathlib.rst:299 msgid "(note how the drive and local root are regrouped in a single part)" @@ -546,6 +647,8 @@ msgid "" "The implementation of the :mod:`os.path` module used for low-level path " "parsing and joining: either :mod:`posixpath` or :mod:`ntpath`." msgstr "" +"La implementación del módulo :mod:`os.path` utilizado para el análisis y " +"unión de rutas de bajo nivel: :mod:`posixpath` o :mod:`ntpath`." #: ../Doc/library/pathlib.rst:320 msgid "A string representing the drive letter or name, if any::" @@ -561,6 +664,12 @@ msgid "" ">>> PurePosixPath('/etc').drive\n" "''" msgstr "" +">>> PureWindowsPath('c:/Program Files/').drive\n" +"'c:'\n" +">>> PureWindowsPath('/Program Files/').drive\n" +"''\n" +">>> PurePosixPath('/etc').drive\n" +"''" #: ../Doc/library/pathlib.rst:329 msgid "UNC shares are also considered drives::" @@ -571,6 +680,8 @@ msgid "" ">>> PureWindowsPath('//host/share/foo.txt').drive\n" "'\\\\\\\\host\\\\share'" msgstr "" +">>> PureWindowsPath('//host/share/foo.txt').drive\n" +"'\\\\\\\\host\\\\share'" #: ../Doc/library/pathlib.rst:336 msgid "A string representing the (local or global) root, if any::" @@ -585,6 +696,12 @@ msgid "" ">>> PurePosixPath('/etc').root\n" "'/'" msgstr "" +">>> PureWindowsPath('c:/Program Files/').root\n" +"'\\\\'\n" +">>> PureWindowsPath('c:Program Files/').root\n" +"''\n" +">>> PurePosixPath('/etc').root\n" +"'/'" #: ../Doc/library/pathlib.rst:345 msgid "UNC shares always have a root::" @@ -595,6 +712,8 @@ msgid "" ">>> PureWindowsPath('//host/share').root\n" "'\\\\'" msgstr "" +">>> PureWindowsPath('//host/share').root\n" +"'\\\\'" #: ../Doc/library/pathlib.rst:350 msgid "" @@ -613,6 +732,12 @@ msgid "" ">>> PurePosixPath('////etc').root\n" "'/'" msgstr "" +">>> PurePosixPath('//etc').root\n" +"'//'\n" +">>> PurePosixPath('///etc').root\n" +"'/'\n" +">>> PurePosixPath('////etc').root\n" +"'/'" #: ../Doc/library/pathlib.rst:362 msgid "" @@ -649,6 +774,14 @@ msgid "" ">>> PureWindowsPath('//host/share').anchor\n" "'\\\\\\\\host\\\\share\\\\'" msgstr "" +">>> PureWindowsPath('c:/Program Files/').anchor\n" +"'c:\\\\'\n" +">>> PureWindowsPath('c:Program Files/').anchor\n" +"'c:'\n" +">>> PurePosixPath('/etc').anchor\n" +"'/'\n" +">>> PureWindowsPath('//host/share').anchor\n" +"'\\\\\\\\host\\\\share\\\\'" #: ../Doc/library/pathlib.rst:386 msgid "" @@ -667,6 +800,13 @@ msgid "" ">>> p.parents[2]\n" "PureWindowsPath('c:/')" msgstr "" +">>> p = PureWindowsPath('c:/foo/bar/setup.py')\n" +">>> p.parents[0]\n" +"PureWindowsPath('c:/foo/bar')\n" +">>> p.parents[1]\n" +"PureWindowsPath('c:/foo')\n" +">>> p.parents[2]\n" +"PureWindowsPath('c:/')" #: ../Doc/library/pathlib.rst:397 msgid "" @@ -686,6 +826,9 @@ msgid "" ">>> p.parent\n" "PurePosixPath('/a/b/c')" msgstr "" +">>> p = PurePosixPath('/a/b/c/d')\n" +">>> p.parent\n" +"PurePosixPath('/a/b/c')" #: ../Doc/library/pathlib.rst:408 msgid "You cannot go past an anchor, or empty path::" @@ -700,6 +843,12 @@ msgid "" ">>> p.parent\n" "PurePosixPath('.')" msgstr "" +">>> p = PurePosixPath('/')\n" +">>> p.parent\n" +"PurePosixPath('/')\n" +">>> p = PurePosixPath('.')\n" +">>> p.parent\n" +"PurePosixPath('.')" #: ../Doc/library/pathlib.rst:418 msgid "This is a purely lexical operation, hence the following behaviour::" @@ -712,6 +861,9 @@ msgid "" ">>> p.parent\n" "PurePosixPath('foo')" msgstr "" +">>> p = PurePosixPath('foo/..')\n" +">>> p.parent\n" +"PurePosixPath('foo')" #: ../Doc/library/pathlib.rst:424 msgid "" @@ -736,6 +888,8 @@ msgid "" ">>> PurePosixPath('my/library/setup.py').name\n" "'setup.py'" msgstr "" +">>> PurePosixPath('my/library/setup.py').name\n" +"'setup.py'" #: ../Doc/library/pathlib.rst:437 msgid "UNC drive names are not considered::" @@ -748,11 +902,14 @@ msgid "" ">>> PureWindowsPath('//some/share').name\n" "''" msgstr "" +">>> PureWindowsPath('//some/share/setup.py').name\n" +"'setup.py'\n" +">>> PureWindowsPath('//some/share').name\n" +"''" #: ../Doc/library/pathlib.rst:447 -#, fuzzy msgid "The last dot-separated portion of the final component, if any::" -msgstr "La extensión del archivo del componente final, si lo hay::" +msgstr "La última porción separada por puntos del componente final, si la hay:" #: ../Doc/library/pathlib.rst:449 msgid "" @@ -763,15 +920,22 @@ msgid "" ">>> PurePosixPath('my/library').suffix\n" "''" msgstr "" +">>> PurePosixPath('my/library/setup.py').suffix\n" +"'.py'\n" +">>> PurePosixPath('my/library.tar.gz').suffix\n" +"'.gz'\n" +">>> PurePosixPath('my/library').suffix\n" +"''" #: ../Doc/library/pathlib.rst:456 msgid "This is commonly called the file extension." -msgstr "" +msgstr "Esto comúnmente se llama extensión de archivo." #: ../Doc/library/pathlib.rst:460 -#, fuzzy msgid "A list of the path's suffixes, often called file extensions::" -msgstr "Una lista de las extensiones de archivo de la ruta::" +msgstr "" +"Una lista de los sufijos de la ruta, a menudo llamados extensiones de " +"archivo:" #: ../Doc/library/pathlib.rst:462 msgid "" @@ -782,6 +946,12 @@ msgid "" ">>> PurePosixPath('my/library').suffixes\n" "[]" msgstr "" +">>> PurePosixPath('my/library.tar.gar').suffixes\n" +"['.tar', '.gar']\n" +">>> PurePosixPath('my/library.tar.gz').suffixes\n" +"['.tar', '.gz']\n" +">>> PurePosixPath('my/library').suffixes\n" +"[]" #: ../Doc/library/pathlib.rst:472 msgid "The final path component, without its suffix::" @@ -796,6 +966,12 @@ msgid "" ">>> PurePosixPath('my/library').stem\n" "'library'" msgstr "" +">>> PurePosixPath('my/library.tar.gz').stem\n" +"'library.tar'\n" +">>> PurePosixPath('my/library.tar').stem\n" +"'library'\n" +">>> PurePosixPath('my/library').stem\n" +"'library'" #: ../Doc/library/pathlib.rst:484 msgid "" @@ -811,6 +987,11 @@ msgid "" ">>> p.as_posix()\n" "'c:/windows'" msgstr "" +">>> p = PureWindowsPath('c:\\\\windows')\n" +">>> str(p)\n" +"'c:\\\\windows'\n" +">>> p.as_posix()\n" +"'c:/windows'" #: ../Doc/library/pathlib.rst:495 msgid "" @@ -836,6 +1017,19 @@ msgid "" ">>> PureWindowsPath('//some/share').is_absolute()\n" "True" msgstr "" +">>> PurePosixPath('/a/b').is_absolute()\n" +"True\n" +">>> PurePosixPath('a/b').is_absolute()\n" +"False\n" +"\n" +">>> PureWindowsPath('c:/a/b').is_absolute()\n" +"True\n" +">>> PureWindowsPath('/a/b').is_absolute()\n" +"False\n" +">>> PureWindowsPath('c:').is_absolute()\n" +"False\n" +">>> PureWindowsPath('//some/share').is_absolute()\n" +"True" #: ../Doc/library/pathlib.rst:515 msgid "Return whether or not this path is relative to the *other* path." @@ -846,6 +1040,9 @@ msgid "" "This method is string-based; it neither accesses the filesystem nor treats " "\"``..``\" segments specially. The following code is equivalent:" msgstr "" +"Este método se basa en cadenas; no accede al sistema de archivos ni trata " +"los segmentos \"``..``\" de manera especial. El siguiente código es " +"equivalente:" #: ../Doc/library/pathlib.rst:534 msgid "" @@ -870,12 +1067,17 @@ msgid "" "Windows path names that contain a colon, or end with a dot or a space, are " "considered reserved. UNC paths may be reserved." msgstr "" +"Los nombres de ruta de Windows que contienen dos puntos o terminan con un " +"punto o un espacio se consideran reservados. Las rutas UNC pueden estar " +"reservadas." #: ../Doc/library/pathlib.rst:547 msgid "" "This method is deprecated; use :func:`os.path.isreserved` to detect reserved " "paths on Windows." msgstr "" +"Este método está obsoleto; utilice :func:`os.path.isreserved` para detectar " +"rutas reservadas en Windows." #: ../Doc/library/pathlib.rst:553 msgid "" @@ -896,15 +1098,23 @@ msgid "" ">>> PureWindowsPath('c:').joinpath('/Program Files')\n" "PureWindowsPath('c:/Program Files')" msgstr "" +">>> PurePosixPath('/etc').joinpath('passwd')\n" +"PurePosixPath('/etc/passwd')\n" +">>> PurePosixPath('/etc').joinpath(PurePosixPath('passwd'))\n" +"PurePosixPath('/etc/passwd')\n" +">>> PurePosixPath('/etc').joinpath('init.d', 'apache2')\n" +"PurePosixPath('/etc/init.d/apache2')\n" +">>> PureWindowsPath('c:').joinpath('/Program Files')\n" +"PureWindowsPath('c:/Program Files')" #: ../Doc/library/pathlib.rst:568 -#, fuzzy msgid "" "Match this path against the provided glob-style pattern. Return ``True`` if " "matching is successful, ``False`` otherwise. For example::" msgstr "" -"Haga coincidir esta ruta con el *pattern* global proporcionado. Retorna " -"``True`` si la coincidencia es exitosa, ``False`` en caso contrario." +"Compare esta ruta con el patrón de estilo glob proporcionado. Devuelva " +"``True`` si la coincidencia es exitosa, ``False`` en caso contrario. Por " +"ejemplo:" #: ../Doc/library/pathlib.rst:571 msgid "" @@ -917,10 +1127,18 @@ msgid "" ">>> PurePath('/a/b/c.py').full_match('**/*.py')\n" "True" msgstr "" +">>> PurePath('a/b.py').full_match('a/*.py')\n" +"True\n" +">>> PurePath('a/b.py').full_match('*.py')\n" +"False\n" +">>> PurePath('/a/b/c.py').full_match('/a/**')\n" +"True\n" +">>> PurePath('/a/b/c.py').full_match('**/*.py')\n" +"True" #: ../Doc/library/pathlib.rst:581 ../Doc/library/pathlib.rst:1291 msgid ":ref:`pathlib-pattern-language` documentation." -msgstr "" +msgstr "Documentación :ref:`pathlib-pattern-language`." #: ../Doc/library/pathlib.rst:583 msgid "As with other methods, case-sensitivity follows platform defaults::" @@ -935,6 +1153,10 @@ msgid "" ">>> PureWindowsPath('b.py').full_match('*.PY')\n" "True" msgstr "" +">>> PurePosixPath('b.py').full_match('*.PY')\n" +"False\n" +">>> PureWindowsPath('b.py').full_match('*.PY')\n" +"True" #: ../Doc/library/pathlib.rst:590 msgid "" @@ -944,13 +1166,12 @@ msgstr "" "comportamiento." #: ../Doc/library/pathlib.rst:597 -#, fuzzy msgid "" "Match this path against the provided non-recursive glob-style pattern. " "Return ``True`` if matching is successful, ``False`` otherwise." msgstr "" -"Haga coincidir esta ruta con el *pattern* global proporcionado. Retorna " -"``True`` si la coincidencia es exitosa, ``False`` en caso contrario." +"Compare esta ruta con el patrón de estilo glob no recursivo proporcionado. " +"Devuelva ``True`` si la coincidencia es exitosa, ``False`` en caso contrario." #: ../Doc/library/pathlib.rst:600 msgid "" @@ -959,6 +1180,10 @@ msgid "" "\"``**``\" isn't supported (it acts like non-recursive \"``*``\"), and if a " "relative pattern is provided, then matching is done from the right::" msgstr "" +"Este método es similar a :meth:`~PurePath.full_match`, pero no se permiten " +"patrones vacíos (se genera :exc:`ValueError`), no se admite el comodín " +"recursivo \"``**``\" (actúa como \"``*``\" no recursivo) y, si se " +"proporciona un patrón relativo, la coincidencia se realiza desde la derecha:" #: ../Doc/library/pathlib.rst:605 msgid "" @@ -969,11 +1194,19 @@ msgid "" ">>> PurePath('/a/b/c.py').match('a/*.py')\n" "False" msgstr "" +">>> PurePath('a/b.py').full_match('a/*.py')\n" +"True\n" +">>> PurePath('a/b.py').full_match('*.py')\n" +"False\n" +">>> PurePath('/a/b/c.py').full_match('/a/**')\n" +"True\n" +">>> PurePath('/a/b/c.py').full_match('**/*.py')\n" +"True" #: ../Doc/library/pathlib.rst:612 ../Doc/library/pathlib.rst:1310 #: ../Doc/library/pathlib.rst:1335 msgid "The *pattern* parameter accepts a :term:`path-like object`." -msgstr "" +msgstr "El parámetro *pattern* acepta un :term:`path-like object`." #: ../Doc/library/pathlib.rst:615 ../Doc/library/pathlib.rst:1304 #: ../Doc/library/pathlib.rst:1329 @@ -1003,19 +1236,31 @@ msgid "" "ValueError: '/etc/passwd' is not in the subpath of '/usr' OR one path is " "relative and the other is absolute." msgstr "" +">>> p = PurePosixPath('/etc/passwd')\n" +">>> p.relative_to('/')\n" +"PurePosixPath('etc/passwd')\n" +">>> p.relative_to('/etc')\n" +"PurePosixPath('passwd')\n" +">>> p.relative_to('/usr')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" File \"pathlib.py\", line 941, in relative_to\n" +" raise ValueError(error_message.format(str(self), str(formatted)))\n" +"ValueError: '/etc/passwd' is not in the subpath of '/usr' OR one path is " +"relative and the other is absolute." #: ../Doc/library/pathlib.rst:636 -#, fuzzy msgid "" "When *walk_up* is false (the default), the path must start with *other*. " "When the argument is true, ``..`` entries may be added to form the relative " "path. In all other cases, such as the paths referencing different drives, :" "exc:`ValueError` is raised.::" msgstr "" -"Cuando *walk_up* es False (por defecto), la ruta debe empezar con *other*. " -"Cuando el argumento es True, se pueden agregar entradas ``..`` para formar " -"la ruta relativa. En todos los demás casos, como las rutas que hacen " -"referencia a diferentes unidades, se lanza :exc:`ValueError`.::" +"Cuando *walk_up* es falso (el valor predeterminado), la ruta debe comenzar " +"con *other*. Cuando el argumento es verdadero, se pueden agregar entradas " +"``..`` para formar la ruta relativa. En todos los demás casos, como las " +"rutas que hacen referencia a diferentes unidades, se genera :exc:" +"`ValueError`.::" #: ../Doc/library/pathlib.rst:641 msgid "" @@ -1029,6 +1274,15 @@ msgid "" "ValueError: '/etc/passwd' is not on the same drive as 'foo' OR one path is " "relative and the other is absolute." msgstr "" +">>> p.relative_to('/usr', walk_up=True)\n" +"PurePosixPath('../etc/passwd')\n" +">>> p.relative_to('foo', walk_up=True)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" File \"pathlib.py\", line 941, in relative_to\n" +" raise ValueError(error_message.format(str(self), str(formatted)))\n" +"ValueError: '/etc/passwd' is not on the same drive as 'foo' OR one path is " +"relative and the other is absolute." #: ../Doc/library/pathlib.rst:651 msgid "" @@ -1082,6 +1336,17 @@ msgid "" " raise ValueError(\"%r has an empty name\" % (self,))\n" "ValueError: PureWindowsPath('c:/') has an empty name" msgstr "" +">>> p = PureWindowsPath('c:/Downloads/pathlib.tar.gz')\n" +">>> p.with_name('setup.py')\n" +"PureWindowsPath('c:/Downloads/setup.py')\n" +">>> p = PureWindowsPath('c:/')\n" +">>> p.with_name('setup.py')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 751, in " +"with_name\n" +" raise ValueError(\"%r has an empty name\" % (self,))\n" +"ValueError: PureWindowsPath('c:/') has an empty name" #: ../Doc/library/pathlib.rst:684 msgid "" @@ -1112,6 +1377,23 @@ msgid "" " raise ValueError(\"%r has an empty name\" % (self,))\n" "ValueError: PureWindowsPath('c:/') has an empty name" msgstr "" +">>> p = PureWindowsPath('c:/Downloads/draft.txt')\n" +">>> p.with_stem('final')\n" +"PureWindowsPath('c:/Downloads/final.txt')\n" +">>> p = PureWindowsPath('c:/Downloads/pathlib.tar.gz')\n" +">>> p.with_stem('lib')\n" +"PureWindowsPath('c:/Downloads/lib.gz')\n" +">>> p = PureWindowsPath('c:/')\n" +">>> p.with_stem('')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 861, in " +"with_stem\n" +" return self.with_name(stem + self.suffix)\n" +" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 851, in " +"with_name\n" +" raise ValueError(\"%r has an empty name\" % (self,))\n" +"ValueError: PureWindowsPath('c:/') has an empty name" #: ../Doc/library/pathlib.rst:708 msgid "" @@ -1135,6 +1417,15 @@ msgid "" ">>> p.with_suffix('')\n" "PureWindowsPath('README')" msgstr "" +">>> p = PureWindowsPath('c:/Downloads/pathlib.tar.gz')\n" +">>> p.with_suffix('.bz2')\n" +"PureWindowsPath('c:/Downloads/pathlib.tar.bz2')\n" +">>> p = PureWindowsPath('README')\n" +">>> p.with_suffix('.txt')\n" +"PureWindowsPath('README.txt')\n" +">>> p = PureWindowsPath('README.txt')\n" +">>> p.with_suffix('')\n" +"PureWindowsPath('README')" #: ../Doc/library/pathlib.rst:725 msgid "" @@ -1164,6 +1455,19 @@ msgid "" "hosts = etc / 'hosts'\n" "print(hosts.session_id) # 42" msgstr "" +"from pathlib import PurePosixPath\n" +"\n" +"class MyPath(PurePosixPath):\n" +" def __init__(self, *pathsegments, session_id):\n" +" super().__init__(*pathsegments)\n" +" self.session_id = session_id\n" +"\n" +" def with_segments(self, *pathsegments):\n" +" return type(self)(*pathsegments, session_id=self.session_id)\n" +"\n" +"etc = MyPath('/etc', session_id=42)\n" +"hosts = etc / 'hosts'\n" +"print(hosts.session_id) # 42" #: ../Doc/library/pathlib.rst:751 msgid "Concrete paths" @@ -1195,6 +1499,8 @@ msgid "" ">>> Path('setup.py')\n" "PosixPath('setup.py')" msgstr "" +">>> Path('setup.py')\n" +"PosixPath('setup.py')" #: ../Doc/library/pathlib.rst:770 msgid "" @@ -1209,12 +1515,16 @@ msgid "" ">>> PosixPath('/etc/hosts')\n" "PosixPath('/etc/hosts')" msgstr "" +">>> PosixPath('/etc/hosts')\n" +"PosixPath('/etc/hosts')" #: ../Doc/library/pathlib.rst:778 msgid "" "Raises :exc:`UnsupportedOperation` on Windows. In previous versions, :exc:" "`NotImplementedError` was raised instead." msgstr "" +"Genera el error :exc:`UnsupportedOperation` en Windows. En versiones " +"anteriores, se generaba el error :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:785 msgid "" @@ -1229,12 +1539,17 @@ msgid "" ">>> WindowsPath('c:/', 'Users', 'Ximénez')\n" "WindowsPath('c:/Users/Ximénez')" msgstr "" +">>> WindowsPath('c:/', 'Users', 'Ximénez')\n" +"WindowsPath('c:/Users/Ximénez')" #: ../Doc/library/pathlib.rst:793 msgid "" "Raises :exc:`UnsupportedOperation` on non-Windows platforms. In previous " "versions, :exc:`NotImplementedError` was raised instead." msgstr "" +"Genera el error :exc:`UnsupportedOperation` en plataformas que no sean " +"Windows. En versiones anteriores, se generaba el error :exc:" +"`NotImplementedError`." #: ../Doc/library/pathlib.rst:798 msgid "" @@ -1262,47 +1577,67 @@ msgid "" " % (cls.__name__,))\n" "UnsupportedOperation: cannot instantiate 'WindowsPath' on your system" msgstr "" +">>> import os\n" +">>> os.name\n" +"'posix'\n" +">>> Path('setup.py')\n" +"PosixPath('setup.py')\n" +">>> PosixPath('setup.py')\n" +"PosixPath('setup.py')\n" +">>> WindowsPath('setup.py')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" File \"pathlib.py\", line 798, in __new__\n" +" % (cls.__name__,))\n" +"UnsupportedOperation: cannot instantiate 'WindowsPath' on your system" #: ../Doc/library/pathlib.rst:816 -#, fuzzy msgid "" "Some concrete path methods can raise an :exc:`OSError` if a system call " "fails (for example because the path doesn't exist)." msgstr "" -"Las rutas concretas proporcionan los siguientes métodos -además de los " -"métodos de ruta puros-. Muchos de estos métodos pueden generar un :exc:" -"`OSError` si falla una llamada al sistema (por ejemplo, porque la ruta no " -"existe)." +"Algunos métodos de ruta concretos pueden generar un :exc:`OSError` si falla " +"una llamada del sistema (por ejemplo, porque la ruta no existe)." #: ../Doc/library/pathlib.rst:821 msgid "Parsing and generating URIs" -msgstr "" +msgstr "Análisis y generación de URI" #: ../Doc/library/pathlib.rst:823 msgid "" "Concrete path objects can be created from, and represented as, 'file' URIs " "conforming to :rfc:`8089`." msgstr "" +"Los objetos de ruta concretos se pueden crear y representar como URI de " +"\"archivo\" que cumplan con :rfc:`8089`." #: ../Doc/library/pathlib.rst:828 msgid "" "File URIs are not portable across machines with different :ref:`filesystem " "encodings `." msgstr "" +"Los URI de archivos no son portables entre máquinas con diferentes :ref:" +"`filesystem encodings `." #: ../Doc/library/pathlib.rst:833 msgid "Return a new path object from parsing a 'file' URI. For example::" msgstr "" +"Devuelve un nuevo objeto de ruta a partir del análisis de una URL de " +"\"archivo\". Por ejemplo:" #: ../Doc/library/pathlib.rst:835 msgid "" ">>> p = Path.from_uri('file:///etc/hosts')\n" "PosixPath('/etc/hosts')" msgstr "" +">>> p = Path.from_uri('file:///etc/hosts')\n" +"PosixPath('/etc/hosts')" #: ../Doc/library/pathlib.rst:838 msgid "On Windows, DOS device and UNC paths may be parsed from URIs::" msgstr "" +"En Windows, los dispositivos DOS y las rutas UNC se pueden analizar desde " +"las URI:" #: ../Doc/library/pathlib.rst:840 msgid "" @@ -1311,10 +1646,14 @@ msgid "" ">>> p = Path.from_uri('file://server/share')\n" "WindowsPath('//server/share')" msgstr "" +">>> p = Path.from_uri('file:///c:/windows')\n" +"WindowsPath('c:/windows')\n" +">>> p = Path.from_uri('file://server/share')\n" +"WindowsPath('//server/share')" #: ../Doc/library/pathlib.rst:845 msgid "Several variant forms are supported::" -msgstr "" +msgstr "Se admiten varias formas variantes:" #: ../Doc/library/pathlib.rst:847 msgid "" @@ -1327,21 +1666,30 @@ msgid "" ">>> p = Path.from_uri('file:/c|/windows')\n" "WindowsPath('c:/windows')" msgstr "" +">>> p = Path.from_uri('file:////server/share')\n" +"WindowsPath('//server/share')\n" +">>> p = Path.from_uri('file://///server/share')\n" +"WindowsPath('//server/share')\n" +">>> p = Path.from_uri('file:c:/windows')\n" +"WindowsPath('c:/windows')\n" +">>> p = Path.from_uri('file:/c|/windows')\n" +"WindowsPath('c:/windows')" #: ../Doc/library/pathlib.rst:856 msgid "" ":exc:`ValueError` is raised if the URI does not start with ``file:``, or the " "parsed path isn't absolute." msgstr "" +"Se genera :exc:`ValueError` si la URI no comienza con ``file:`` o la ruta " +"analizada no es absoluta." #: ../Doc/library/pathlib.rst:864 -#, fuzzy msgid "" "Represent the path as a 'file' URI. :exc:`ValueError` is raised if the path " "isn't absolute." msgstr "" -"Representa la ruta como un ``file`` URI. :exc:`ValueError` se genera si la " -"ruta no es absoluta." +"Representa la ruta como una URL de \"archivo\". Se genera :exc:`ValueError` " +"si la ruta no es absoluta." #: ../Doc/library/pathlib.rst:867 msgid "" @@ -1352,16 +1700,25 @@ msgid "" ">>> p.as_uri()\n" "'file:///c:/Windows'" msgstr "" +">>> p = PosixPath('/etc/passwd')\n" +">>> p.as_uri()\n" +"'file:///etc/passwd'\n" +">>> p = WindowsPath('c:/Windows')\n" +">>> p.as_uri()\n" +"'file:///c:/Windows'" #: ../Doc/library/pathlib.rst:876 msgid "" "For historical reasons, this method is also available from :class:`PurePath` " "objects. However, its use of :func:`os.fsencode` makes it strictly impure." msgstr "" +"Por razones históricas, este método también está disponible para objetos :" +"class:`PurePath`. Sin embargo, su uso en :func:`os.fsencode` lo hace " +"estrictamente impuro." #: ../Doc/library/pathlib.rst:882 msgid "Expanding and resolving paths" -msgstr "" +msgstr "Ampliando y resolviendo caminos" #: ../Doc/library/pathlib.rst:886 msgid "" @@ -1379,6 +1736,8 @@ msgid "" ">>> Path.home()\n" "PosixPath('/home/antoine')" msgstr "" +">>> Path.home()\n" +"PosixPath('/home/antoine')" #: ../Doc/library/pathlib.rst:900 msgid "" @@ -1396,6 +1755,9 @@ msgid "" ">>> p.expanduser()\n" "PosixPath('/home/eric/films/Monty Python')" msgstr "" +">>> p = PosixPath('~/films/Monty Python')\n" +">>> p.expanduser()\n" +"PosixPath('/home/eric/films/Monty Python')" #: ../Doc/library/pathlib.rst:915 msgid "" @@ -1410,6 +1772,8 @@ msgid "" ">>> Path.cwd()\n" "PosixPath('/home/antoine/pathlib')" msgstr "" +">>> Path.cwd()\n" +"PosixPath('/home/antoine/pathlib')" #: ../Doc/library/pathlib.rst:924 msgid "" @@ -1427,6 +1791,11 @@ msgid "" ">>> p.absolute()\n" "PosixPath('/home/antoine/pathlib/tests')" msgstr "" +">>> p = Path('tests')\n" +">>> p\n" +"PosixPath('tests')\n" +">>> p.absolute()\n" +"PosixPath('/home/antoine/pathlib/tests')" #: ../Doc/library/pathlib.rst:936 msgid "" @@ -1444,6 +1813,11 @@ msgid "" ">>> p.resolve()\n" "PosixPath('/home/antoine/pathlib')" msgstr "" +">>> p = Path()\n" +">>> p\n" +"PosixPath('.')\n" +">>> p.resolve()\n" +"PosixPath('/home/antoine/pathlib')" #: ../Doc/library/pathlib.rst:945 msgid "" @@ -1459,20 +1833,21 @@ msgid "" ">>> p.resolve()\n" "PosixPath('/home/antoine/pathlib/setup.py')" msgstr "" +">>> p = Path('docs/../setup.py')\n" +">>> p.resolve()\n" +"PosixPath('/home/antoine/pathlib/setup.py')" #: ../Doc/library/pathlib.rst:951 -#, fuzzy msgid "" "If a path doesn't exist or a symlink loop is encountered, and *strict* is " "``True``, :exc:`OSError` is raised. If *strict* is ``False``, the path is " "resolved as far as possible and any remainder is appended without checking " "whether it exists." msgstr "" -"Si la ruta no existe y *strict* es ``True``, se genera :exc:" -"`FileNotFoundError`. Si *strict* es ``False``, la ruta se resuelve en la " -"medida de lo posible y se agrega el resto sin verificar si existe. Si se " -"encuentra un bucle infinito en la resolución de la ruta se genera :exc:" -"`RuntimeError`." +"Si no existe una ruta o se encuentra un bucle de enlace simbólico y *strict* " +"es ``True``, se genera :exc:`OSError`. Si *strict* es ``False``, la ruta se " +"resuelve en la medida de lo posible y cualquier resto se agrega sin " +"verificar si existe." #: ../Doc/library/pathlib.rst:956 msgid "The *strict* parameter was added (pre-3.6 behavior is strict)." @@ -1485,6 +1860,10 @@ msgid "" "strict mode, and no exception is raised in non-strict mode. In previous " "versions, :exc:`RuntimeError` is raised no matter the value of *strict*." msgstr "" +"Los bucles de enlaces simbólicos se tratan como otros errores: :exc:" +"`OSError` se genera en modo estricto y no se genera ninguna excepción en " +"modo no estricto. En versiones anteriores, :exc:`RuntimeError` se genera sin " +"importar el valor de *strict*." #: ../Doc/library/pathlib.rst:967 msgid "" @@ -1501,19 +1880,24 @@ msgid "" ">>> p.readlink()\n" "PosixPath('setup.py')" msgstr "" +">>> p = Path('mylink')\n" +">>> p.symlink_to('setup.py')\n" +">>> p.readlink()\n" +"PosixPath('setup.py')" #: ../Doc/library/pathlib.rst:977 msgid "" "Raises :exc:`UnsupportedOperation` if :func:`os.readlink` is not available. " "In previous versions, :exc:`NotImplementedError` was raised." msgstr "" +"Genera :exc:`UnsupportedOperation` si :func:`os.readlink` no está " +"disponible. En versiones anteriores, se generaba :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:983 msgid "Querying file type and status" -msgstr "" +msgstr "Consulta de tipo de archivo y estado" #: ../Doc/library/pathlib.rst:987 -#, fuzzy msgid "" ":meth:`~Path.exists`, :meth:`~Path.is_dir`, :meth:`~Path.is_file`, :meth:" "`~Path.is_mount`, :meth:`~Path.is_symlink`, :meth:`~Path.is_block_device`, :" @@ -1521,23 +1905,21 @@ msgid "" "now return ``False`` instead of raising an exception for paths that contain " "characters unrepresentable at the OS level." msgstr "" -":meth:`~Path.exists()`, :meth:`~Path.is_dir()`, :meth:`~Path.is_file()`, :" -"meth:`~Path.is_mount()`, :meth:`~Path.is_symlink()`, :meth:`~Path." -"is_block_device()`, :meth:`~Path.is_char_device()`, :meth:`~Path." -"is_fifo()`, :meth:`~Path.is_socket()` ahora retorna ``False`` en lugar de " -"generar una excepción para las rutas que contienen caracteres que no se " -"pueden representar a nivel del sistema operativo." +":meth:`~Path.exists`, :meth:`~Path.is_dir`, :meth:`~Path.is_file`, :meth:" +"`~Path.is_mount`, :meth:`~Path.is_symlink`, :meth:`~Path.is_block_device`, :" +"meth:`~Path.is_char_device`, :meth:`~Path.is_fifo`, :meth:`~Path.is_socket` " +"ahora devuelven ``False`` en lugar de generar una excepción para las rutas " +"que contienen caracteres no representables en el nivel del sistema operativo." #: ../Doc/library/pathlib.rst:997 -#, fuzzy msgid "" "Return an :class:`os.stat_result` object containing information about this " "path, like :func:`os.stat`. The result is looked up at each call to this " "method." msgstr "" -"Retorna un objeto :class:`os.stat_result` que contiene información sobre " -"esta ruta, del mismo modo que :func:`os.stat`. El resultado se consulta en " -"cada llamada a este método." +"Devuelve un objeto :class:`os.stat_result` que contiene información sobre " +"esta ruta, como :func:`os.stat`. El resultado se consulta en cada llamada a " +"este método." #: ../Doc/library/pathlib.rst:1000 msgid "" @@ -1556,6 +1938,11 @@ msgid "" ">>> p.stat().st_mtime\n" "1327883547.852554" msgstr "" +">>> p = Path('setup.py')\n" +">>> p.stat().st_size\n" +"956\n" +">>> p.stat().st_mtime\n" +"1327883547.852554" #: ../Doc/library/pathlib.rst:1011 ../Doc/library/pathlib.rst:1039 #: ../Doc/library/pathlib.rst:1054 ../Doc/library/pathlib.rst:1069 @@ -1597,16 +1984,22 @@ msgid "" ">>> Path('nonexistentfile').exists()\n" "False" msgstr "" +">>> Path('.').exists()\n" +"True\n" +">>> Path('setup.py').exists()\n" +"True\n" +">>> Path('/etc').exists()\n" +"True\n" +">>> Path('nonexistentfile').exists()\n" +"False" #: ../Doc/library/pathlib.rst:1045 -#, fuzzy msgid "" "Return ``True`` if the path points to a regular file, ``False`` if it points " "to another kind of file." msgstr "" -"Retorna ``True`` si la ruta apunta a un archivo normal (o un enlace " -"simbólico que apunta a un archivo normal), ``Falso`` si apunta a otro tipo " -"de archivo." +"Devuelve ``True`` si la ruta apunta a un archivo normal, ``False`` si apunta " +"a otro tipo de archivo." #: ../Doc/library/pathlib.rst:1048 ../Doc/library/pathlib.rst:1063 #: ../Doc/library/pathlib.rst:1111 ../Doc/library/pathlib.rst:1120 @@ -1619,31 +2012,29 @@ msgstr "" "roto; se propagan otros errores (como errores de permiso)." #: ../Doc/library/pathlib.rst:1051 -#, fuzzy msgid "" "This method normally follows symlinks; to exclude symlinks, add the argument " "``follow_symlinks=False``." msgstr "" -"Este método normalmente sigue enlaces simbólicos; para comprobar si existe " -"un enlace simbólico, agregue el argumento ``follow_symlinks=False``." +"Este método normalmente sigue los enlaces simbólicos; para excluirlos, " +"agregue el argumento ``follow_symlinks=False``." #: ../Doc/library/pathlib.rst:1060 -#, fuzzy msgid "" "Return ``True`` if the path points to a directory, ``False`` if it points to " "another kind of file." msgstr "" -"Retorna ``True`` si la ruta apunta a un directorio (o un enlace simbólico " -"que apunta a un directorio), ``False`` si apunta a otro tipo de archivo." +"Devuelve ``True`` si la ruta apunta a un directorio, ``False`` si apunta a " +"otro tipo de archivo." #: ../Doc/library/pathlib.rst:1066 -#, fuzzy msgid "" "This method normally follows symlinks; to exclude symlinks to directories, " "add the argument ``follow_symlinks=False``." msgstr "" -"Este método normalmente sigue enlaces simbólicos; para comprobar si existe " -"un enlace simbólico, agregue el argumento ``follow_symlinks=False``." +"Este método normalmente sigue los enlaces simbólicos; para excluir los " +"enlaces simbólicos a directorios, agregue el argumento " +"``follow_symlinks=False``." #: ../Doc/library/pathlib.rst:1075 msgid "" @@ -1754,10 +2145,16 @@ msgid "" ">>> p.samefile('spam')\n" "True" msgstr "" +">>> p = Path('spam')\n" +">>> q = Path('eggs')\n" +">>> p.samefile(q)\n" +"False\n" +">>> p.samefile('spam')\n" +"True" #: ../Doc/library/pathlib.rst:1164 msgid "Reading and writing files" -msgstr "" +msgstr "Lectura y escritura de archivos" #: ../Doc/library/pathlib.rst:1169 msgid "" @@ -1775,6 +2172,11 @@ msgid "" "...\n" "'#!/usr/bin/env python3\\n'" msgstr "" +">>> p = Path('setup.py')\n" +">>> with p.open() as f:\n" +"... f.readline()\n" +"...\n" +"'#!/usr/bin/env python3\\n'" #: ../Doc/library/pathlib.rst:1181 msgid "Return the decoded contents of the pointed-to file as a string::" @@ -1789,6 +2191,11 @@ msgid "" ">>> p.read_text()\n" "'Text file contents'" msgstr "" +">>> p = Path('my_text_file')\n" +">>> p.write_text('Text file contents')\n" +"18\n" +">>> p.read_text()\n" +"'Text file contents'" #: ../Doc/library/pathlib.rst:1189 msgid "" @@ -1815,6 +2222,11 @@ msgid "" ">>> p.read_bytes()\n" "b'Binary file contents'" msgstr "" +">>> p = Path('my_binary_file')\n" +">>> p.write_bytes(b'Binary file contents')\n" +"20\n" +">>> p.read_bytes()\n" +"b'Binary file contents'" #: ../Doc/library/pathlib.rst:1213 msgid "" @@ -1843,9 +2255,8 @@ msgid "An existing file of the same name is overwritten." msgstr "Se sobrescribe un archivo existente con el mismo nombre." #: ../Doc/library/pathlib.rst:1248 -#, fuzzy msgid "Reading directories" -msgstr "Listado de subdirectorios::" +msgstr "Directorios de lectura" #: ../Doc/library/pathlib.rst:1252 msgid "" @@ -1868,25 +2279,36 @@ msgid "" "PosixPath('docs/_static')\n" "PosixPath('docs/Makefile')" msgstr "" +">>> p = Path('docs')\n" +">>> for child in p.iterdir(): child\n" +"...\n" +"PosixPath('docs/conf.py')\n" +"PosixPath('docs/_templates')\n" +"PosixPath('docs/make.bat')\n" +"PosixPath('docs/index.rst')\n" +"PosixPath('docs/_build')\n" +"PosixPath('docs/_static')\n" +"PosixPath('docs/Makefile')" #: ../Doc/library/pathlib.rst:1266 -#, fuzzy msgid "" "The children are yielded in arbitrary order, and the special entries ``'.'`` " "and ``'..'`` are not included. If a file is removed from or added to the " "directory after creating the iterator, it is unspecified whether a path " "object for that file is included." msgstr "" -"Los hijos se generan en orden arbitrario y las entradas especiales ``'.'`` y " -"``'..'`` no están incluidas. Si un archivo se elimina o se agrega al " -"directorio después de crear el iterador, no se especifica si se incluirá un " -"objeto de ruta para ese archivo." +"Los elementos secundarios se obtienen en un orden arbitrario y no se " +"incluyen las entradas especiales ``'.'`` y ``'..'``. Si se elimina o se " +"agrega un archivo al directorio después de crear el iterador, no se " +"especifica si se incluye un objeto de ruta para ese archivo." #: ../Doc/library/pathlib.rst:1271 msgid "" "If the path is not a directory or otherwise inaccessible, :exc:`OSError` is " "raised." msgstr "" +"Si la ruta no es un directorio o es inaccesible por algún motivo, se genera :" +"exc:`OSError`." #: ../Doc/library/pathlib.rst:1276 msgid "" @@ -1910,6 +2332,17 @@ msgid "" " PosixPath('setup.py'),\n" " PosixPath('test_pathlib.py')]" msgstr "" +">>> sorted(Path('.').glob('*.py'))\n" +"[PosixPath('pathlib.py'), PosixPath('setup.py'), PosixPath('test_pathlib." +"py')]\n" +">>> sorted(Path('.').glob('*/*.py'))\n" +"[PosixPath('docs/conf.py')]\n" +">>> sorted(Path('.').glob('**/*.py'))\n" +"[PosixPath('build/lib/pathlib.py'),\n" +" PosixPath('docs/conf.py'),\n" +" PosixPath('pathlib.py'),\n" +" PosixPath('setup.py'),\n" +" PosixPath('test_pathlib.py')]" #: ../Doc/library/pathlib.rst:1293 msgid "" @@ -1931,6 +2364,10 @@ msgid "" "``False``, this method follows symlinks except when expanding \"``**``\" " "wildcards. Set *recurse_symlinks* to ``True`` to always follow symlinks." msgstr "" +"De forma predeterminada, o cuando el argumento de palabra clave " +"*recurse_symlinks* se establece en ``False``, este método sigue los enlaces " +"simbólicos excepto cuando se expanden los comodines \"``**``\". Establezca " +"*recurse_symlinks* en ``True`` para seguir siempre los enlaces simbólicos." #: ../Doc/library/pathlib.rst:1302 msgid "" @@ -1941,9 +2378,8 @@ msgstr "" "argumentos ``self``, ``pattern``." #: ../Doc/library/pathlib.rst:1307 ../Doc/library/pathlib.rst:1332 -#, fuzzy msgid "The *recurse_symlinks* parameter was added." -msgstr "Se agregó el parámetro *follow_symlinks*." +msgstr "Se agregó el parámetro *recurse_symlinks*." #: ../Doc/library/pathlib.rst:1313 msgid "" @@ -1951,20 +2387,21 @@ msgid "" "suppressed. In previous versions, such exceptions are suppressed in many " "cases, but not all." msgstr "" +"Se suprimen todas las excepciones :exc:`OSError` generadas al escanear el " +"sistema de archivos. En versiones anteriores, dichas excepciones se " +"suprimían en muchos casos, pero no en todos." #: ../Doc/library/pathlib.rst:1321 -#, fuzzy msgid "" "Glob the given relative *pattern* recursively. This is like calling :func:" "`Path.glob` with \"``**/``\" added in front of the *pattern*." msgstr "" -"Agrupa el *pattern* relativo dado de forma recursiva. Esto es como llamar a :" -"func:`Path.glob` con \"``**/``\" agregado antes del *pattern*, donde los " -"*patterns* son los mismos que para :mod:`fnmatch`::" +"Incorpore de forma recursiva el *pattern* relativo dado. Es como llamar a :" +"func:`Path.glob` con \"``**/``\" agregado delante de *pattern*." #: ../Doc/library/pathlib.rst:1325 msgid ":ref:`pathlib-pattern-language` and :meth:`Path.glob` documentation." -msgstr "" +msgstr "Documentación :ref:`pathlib-pattern-language` y :meth:`Path.glob`." #: ../Doc/library/pathlib.rst:1327 msgid "" @@ -2029,7 +2466,6 @@ msgstr "" "las tripletas del directorio y sus subdirectorios." #: ../Doc/library/pathlib.rst:1364 -#, fuzzy msgid "" "When *top_down* is true, the caller can modify the *dirnames* list in-place " "(for example, using :keyword:`del` or slice assignment), and :meth:`Path." @@ -2042,15 +2478,16 @@ msgid "" "generated by the time *dirnames* is yielded to the caller." msgstr "" "Cuando *top_down* es verdadero, el llamador puede modificar la lista " -"*dirnames* en el lugar (por ejemplo, al usar :keyword:`del` o la asignación " -"de segmentos), y :meth:`Path.walk` solo recurrirá a los subdirectorios cuyos " -"nombres permanezcan en *dirnames*. Esto se puede usar para reducir la " -"búsqueda, o para imponer un orden específico de visita, o incluso para " -"informar a :meth:`Path.walk` sobre los directorios que el llamador crea o " -"renombra antes de que reanude :meth:`Path.walk` nuevamente. Modificar " -"*dirnames* cuando *top_down* es falso no tiene efecto en el comportamiento " -"de :meth:`Path.walk()` ya que los directorios en *dirnames* ya se han " -"generado en el momento en que *dirnames* se entrega al llamador." +"*dirnames* en el lugar (por ejemplo, utilizando :keyword:`del` o la " +"asignación de sectores), y :meth:`Path.walk` solo recurrirá a los " +"subdirectorios cuyos nombres permanezcan en *dirnames*. Esto se puede " +"utilizar para podar la búsqueda, o para imponer un orden específico de " +"visita, o incluso para informar a :meth:`Path.walk` sobre los directorios " +"que el llamador crea o renombra antes de reanudar :meth:`Path.walk` " +"nuevamente. Modificar *dirnames* cuando *top_down* es falso no tiene ningún " +"efecto sobre el comportamiento de :meth:`Path.walk` ya que los directorios " +"en *dirnames* ya se han generado en el momento en que *dirnames* se cede al " +"llamador." #: ../Doc/library/pathlib.rst:1374 msgid "" @@ -2139,6 +2576,19 @@ msgid "" " if '__pycache__' in dirs:\n" " dirs.remove('__pycache__')" msgstr "" +"from pathlib import Path\n" +"for root, dirs, files in Path(\"cpython/Lib/concurrent\")." +"walk(on_error=print):\n" +" print(\n" +" root,\n" +" \"consumes\",\n" +" sum((root / file).stat().st_size for file in files),\n" +" \"bytes in\",\n" +" len(files),\n" +" \"non-directory files\"\n" +" )\n" +" if '__pycache__' in dirs:\n" +" dirs.remove('__pycache__')" #: ../Doc/library/pathlib.rst:1419 msgid "" @@ -2163,12 +2613,10 @@ msgid "" msgstr "" #: ../Doc/library/pathlib.rst:1436 -#, fuzzy msgid "Creating files and directories" -msgstr "Listado de subdirectorios::" +msgstr "Creando archivos y directorios" #: ../Doc/library/pathlib.rst:1440 -#, fuzzy msgid "" "Create a file at this given path. If *mode* is given, it is combined with " "the process's ``umask`` value to determine the file mode and access flags. " @@ -2176,28 +2624,30 @@ msgid "" "(and its modification time is updated to the current time), otherwise :exc:" "`FileExistsError` is raised." msgstr "" -"Crea un archivo en la ruta dada. Si se proporciona *mode*, se combina con el " -"valor del proceso ``umask`` para determinar el modo de archivo y los " -"indicadores de acceso. Si el archivo ya existe, la función tiene éxito si " -"*exist_ok* es verdadero (y su hora de modificación se actualiza a la hora " -"actual), de lo contrario se genera :exc:`FileExistsError`." +"Crea un archivo en esta ruta dada. Si se proporciona *mode*, se combina con " +"el valor ``umask`` del proceso para determinar el modo de archivo y los " +"indicadores de acceso. Si el archivo ya existe, la función se ejecuta " +"correctamente cuando *exist_ok* es verdadero (y su hora de modificación se " +"actualiza a la hora actual); de lo contrario, se genera :exc:" +"`FileExistsError`." #: ../Doc/library/pathlib.rst:1447 msgid "" "The :meth:`~Path.open`, :meth:`~Path.write_text` and :meth:`~Path." "write_bytes` methods are often used to create files." msgstr "" +"Los métodos :meth:`~Path.open`, :meth:`~Path.write_text` y :meth:`~Path." +"write_bytes` se utilizan a menudo para crear archivos." #: ../Doc/library/pathlib.rst:1453 -#, fuzzy msgid "" "Create a new directory at this given path. If *mode* is given, it is " "combined with the process's ``umask`` value to determine the file mode and " "access flags. If the path already exists, :exc:`FileExistsError` is raised." msgstr "" -"Crea un nuevo directorio en la ruta dada. Si se proporciona *mode*, se " -"combina con el valor del proceso ``umask`` para determinar el modo de " -"archivo y los derechos de acceso. Si la ruta ya existe, se genera :exc:" +"Crea un nuevo directorio en esta ruta indicada. Si se proporciona *mode*, se " +"combina con el valor ``umask`` del proceso para determinar el modo de " +"archivo y los indicadores de acceso. Si la ruta ya existe, se genera :exc:" "`FileExistsError`." #: ../Doc/library/pathlib.rst:1458 @@ -2227,24 +2677,22 @@ msgstr "" "`FileExistsError` si el directorio de destino ya existe." #: ../Doc/library/pathlib.rst:1468 -#, fuzzy msgid "" "If *exist_ok* is true, :exc:`FileExistsError` will not be raised unless the " "given path already exists in the file system and is not a directory (same " "behavior as the POSIX ``mkdir -p`` command)." msgstr "" -"Si *missing_ok* es verdadero, las excepciones :exc:`FileNotFoundError` serán " -"ignoradas (el mismo comportamiento que el comando POSIX ``rm -f``)." +"Si *exist_ok* es verdadero, no se generará :exc:`FileExistsError` a menos " +"que la ruta dada ya exista en el sistema de archivos y no sea un directorio " +"(el mismo comportamiento que el comando POSIX ``mkdir -p``)." #: ../Doc/library/pathlib.rst:1472 msgid "The *exist_ok* parameter was added." msgstr "Se agregó el parámetro *exist_ok*." #: ../Doc/library/pathlib.rst:1478 -#, fuzzy msgid "Make this path a symbolic link pointing to *target*." -msgstr "" -"Hace de esta ruta un enlace fijo que apunta al mismo archivo que *target*." +msgstr "Convierte esta ruta en un enlace simbólico que apunte a *target*." #: ../Doc/library/pathlib.rst:1480 msgid "" @@ -2254,6 +2702,13 @@ msgid "" "a directory if *target_is_directory* is true or a file symlink (the default) " "otherwise. On non-Windows platforms, *target_is_directory* is ignored." msgstr "" +"En Windows, un enlace simbólico representa un archivo o un directorio y no " +"se transforma en el destino de forma dinámica. Si el destino está presente, " +"se creará el tipo de enlace simbólico para que coincida. De lo contrario, el " +"enlace simbólico se creará como un directorio si *target_is_directory* es " +"verdadero o como un enlace simbólico de archivo (el valor predeterminado) en " +"caso contrario. En plataformas que no sean Windows, se ignora " +"*target_is_directory*." #: ../Doc/library/pathlib.rst:1488 msgid "" @@ -2266,6 +2721,14 @@ msgid "" ">>> p.lstat().st_size\n" "8" msgstr "" +">>> p = Path('mylink')\n" +">>> p.symlink_to('setup.py')\n" +">>> p.resolve()\n" +"PosixPath('/home/antoine/pathlib/setup.py')\n" +">>> p.stat().st_size\n" +"956\n" +">>> p.lstat().st_size\n" +"8" #: ../Doc/library/pathlib.rst:1498 msgid "" @@ -2279,6 +2742,8 @@ msgid "" "Raises :exc:`UnsupportedOperation` if :func:`os.symlink` is not available. " "In previous versions, :exc:`NotImplementedError` was raised." msgstr "" +"Genera :exc:`UnsupportedOperation` si :func:`os.symlink` no está disponible. " +"En versiones anteriores, se generaba :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:1508 msgid "Make this path a hard link to the same file as *target*." @@ -2296,13 +2761,14 @@ msgid "" "Raises :exc:`UnsupportedOperation` if :func:`os.link` is not available. In " "previous versions, :exc:`NotImplementedError` was raised." msgstr "" +"Genera :exc:`UnsupportedOperation` si :func:`os.link` no está disponible. En " +"versiones anteriores, se generaba :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:1522 msgid "Renaming and deleting" -msgstr "" +msgstr "Cambiar nombre y eliminar" #: ../Doc/library/pathlib.rst:1526 -#, fuzzy msgid "" "Rename this file or directory to the given *target*, and return a new :class:" "`!Path` instance pointing to *target*. On Unix, if *target* exists and is a " @@ -2310,11 +2776,11 @@ msgid "" "if *target* exists, :exc:`FileExistsError` will be raised. *target* can be " "either a string or another path object::" msgstr "" -"Cambia el nombre de este archivo o directorio al *target* dado y retorna una " -"nueva instancia de *Path* apuntando al *target*. En Unix, si el *target* " -"existe y es un archivo, se reemplazará silenciosamente si el usuario tiene " -"permiso. En Windows, si el *target* existe, se lanzará una excepción :exc:" -"`FileExistsError`. El *target* puede ser una cadena u otro objeto de ruta:" +"Cambie el nombre de este archivo o directorio al *target* indicado y " +"devuelva una nueva instancia de :class:`!Path` que apunte a *target*. En " +"Unix, si *target* existe y es un archivo, se reemplazará de forma silenciosa " +"si el usuario tiene permiso. En Windows, si *target* existe, se generará :" +"exc:`FileExistsError`. *target* puede ser una cadena u otro objeto de ruta:" #: ../Doc/library/pathlib.rst:1532 msgid "" @@ -2327,17 +2793,24 @@ msgid "" ">>> target.open().read()\n" "'some text'" msgstr "" +">>> p = Path('foo')\n" +">>> p.open('w').write('some text')\n" +"9\n" +">>> target = Path('bar')\n" +">>> p.rename(target)\n" +"PosixPath('bar')\n" +">>> target.open().read()\n" +"'some text'" #: ../Doc/library/pathlib.rst:1541 ../Doc/library/pathlib.rst:1557 -#, fuzzy msgid "" "The target path may be absolute or relative. Relative paths are interpreted " "relative to the current working directory, *not* the directory of the :class:" "`!Path` object." msgstr "" -"La ruta de destino puede ser absoluta o relativa. Las rutas de acceso " -"relativas se interpretan en relación con el directorio de trabajo actual, " -"*no* el directorio del objeto Path." +"La ruta de destino puede ser absoluta o relativa. Las rutas relativas se " +"interpretan en relación con el directorio de trabajo actual, *not* el " +"directorio del objeto :class:`!Path`." #: ../Doc/library/pathlib.rst:1545 msgid "" @@ -2347,20 +2820,20 @@ msgstr "" "Se implementa en términos de :func:`os.rename` y ofrece las mismas garantías." #: ../Doc/library/pathlib.rst:1547 ../Doc/library/pathlib.rst:1561 -#, fuzzy msgid "Added return value, return the new :class:`!Path` instance." -msgstr "Valor de retorno agregado, retorna la nueva instancia de *Path*." +msgstr "" +"Se agregó valor de retorno, devuelve la nueva instancia :class:`!Path`." #: ../Doc/library/pathlib.rst:1553 -#, fuzzy msgid "" "Rename this file or directory to the given *target*, and return a new :class:" "`!Path` instance pointing to *target*. If *target* points to an existing " "file or empty directory, it will be unconditionally replaced." msgstr "" -"Cambia el nombre de este archivo o directorio al *target* dado y retorna una " -"nueva instancia de *Path* que apunte a *target*. Si *target* apunta a un " -"archivo existente o a un directorio vacío, se reemplazará incondicionalmente." +"Cambie el nombre de este archivo o directorio por el *target* indicado y " +"devuelva una nueva instancia de :class:`!Path` que apunte a *target*. Si " +"*target* apunta a un archivo existente o a un directorio vacío, se " +"reemplazará sin condiciones." #: ../Doc/library/pathlib.rst:1567 msgid "" @@ -2396,57 +2869,58 @@ msgstr "Elimina el directorio. El directorio debe estar vacío." #: ../Doc/library/pathlib.rst:1586 msgid "Permissions and ownership" -msgstr "" +msgstr "Permisos y propiedad" #: ../Doc/library/pathlib.rst:1590 -#, fuzzy msgid "" "Return the name of the user owning the file. :exc:`KeyError` is raised if " "the file's user identifier (UID) isn't found in the system database." msgstr "" -"Retorna el nombre del usuario propietario del archivo. :exc:`KeyError` se " -"genera si el *uid* del archivo no se encuentra en la base de datos del " -"sistema." +"Devuelve el nombre del usuario propietario del archivo. Se genera el error :" +"exc:`KeyError` si el identificador de usuario (UID) del archivo no se " +"encuentra en la base de datos del sistema." #: ../Doc/library/pathlib.rst:1593 -#, fuzzy msgid "" "This method normally follows symlinks; to get the owner of the symlink, add " "the argument ``follow_symlinks=False``." msgstr "" -"Este método normalmente sigue enlaces simbólicos; para comprobar si existe " -"un enlace simbólico, agregue el argumento ``follow_symlinks=False``." +"Este método normalmente sigue enlaces simbólicos; para obtener el " +"propietario del enlace simbólico, agregue el argumento " +"``follow_symlinks=False``." #: ../Doc/library/pathlib.rst:1596 msgid "" "Raises :exc:`UnsupportedOperation` if the :mod:`pwd` module is not " "available. In earlier versions, :exc:`NotImplementedError` was raised." msgstr "" +"Genera :exc:`UnsupportedOperation` si el módulo :mod:`pwd` no está " +"disponible. En versiones anteriores, se generaba :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:1606 -#, fuzzy msgid "" "Return the name of the group owning the file. :exc:`KeyError` is raised if " "the file's group identifier (GID) isn't found in the system database." msgstr "" -"Retorna el nombre del grupo propietario del archivo. :exc:`KeyError` se " -"genera si el *gid* del archivo no se encuentra en la base de datos del " -"sistema." +"Devuelve el nombre del grupo propietario del archivo. Se genera :exc:" +"`KeyError` si no se encuentra el identificador de grupo (GID) del archivo en " +"la base de datos del sistema." #: ../Doc/library/pathlib.rst:1609 -#, fuzzy msgid "" "This method normally follows symlinks; to get the group of the symlink, add " "the argument ``follow_symlinks=False``." msgstr "" -"Este método normalmente sigue enlaces simbólicos; para comprobar si existe " -"un enlace simbólico, agregue el argumento ``follow_symlinks=False``." +"Este método normalmente sigue enlaces simbólicos; para obtener el grupo del " +"enlace simbólico, agregue el argumento ``follow_symlinks=False``." #: ../Doc/library/pathlib.rst:1612 msgid "" "Raises :exc:`UnsupportedOperation` if the :mod:`grp` module is not " "available. In earlier versions, :exc:`NotImplementedError` was raised." msgstr "" +"Genera :exc:`UnsupportedOperation` si el módulo :mod:`grp` no está " +"disponible. En versiones anteriores, se generaba :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:1622 msgid "Change the file mode and permissions, like :func:`os.chmod`." @@ -2472,6 +2946,12 @@ msgid "" ">>> p.stat().st_mode\n" "33060" msgstr "" +">>> p = Path('setup.py')\n" +">>> p.stat().st_mode\n" +"33277\n" +">>> p.chmod(0o444)\n" +">>> p.stat().st_mode\n" +"33060" #: ../Doc/library/pathlib.rst:1643 msgid "" @@ -2483,162 +2963,184 @@ msgstr "" #: ../Doc/library/pathlib.rst:1650 msgid "Pattern language" -msgstr "" +msgstr "Lenguaje de patrones" #: ../Doc/library/pathlib.rst:1652 msgid "" "The following wildcards are supported in patterns for :meth:`~PurePath." "full_match`, :meth:`~Path.glob` and :meth:`~Path.rglob`:" msgstr "" +"Los siguientes comodines son compatibles con los patrones para :meth:" +"`~PurePath.full_match`, :meth:`~Path.glob` y :meth:`~Path.rglob`:" #: ../Doc/library/pathlib.rst:1655 msgid "``**`` (entire segment)" -msgstr "" +msgstr "``**`` (segmento completo)" #: ../Doc/library/pathlib.rst:1656 msgid "Matches any number of file or directory segments, including zero." msgstr "" +"Coincide con cualquier número de segmentos de archivo o directorio, incluido " +"cero." #: ../Doc/library/pathlib.rst:1657 msgid "``*`` (entire segment)" -msgstr "" +msgstr "``*`` (segmento completo)" #: ../Doc/library/pathlib.rst:1658 msgid "Matches one file or directory segment." -msgstr "" +msgstr "Coincide con un segmento de archivo o directorio." #: ../Doc/library/pathlib.rst:1659 msgid "``*`` (part of a segment)" -msgstr "" +msgstr "``*`` (parte de un segmento)" #: ../Doc/library/pathlib.rst:1660 msgid "Matches any number of non-separator characters, including zero." msgstr "" +"Coincide con cualquier número de caracteres no separadores, incluido el cero." #: ../Doc/library/pathlib.rst:1661 msgid "``?``" -msgstr "" +msgstr "``?``" #: ../Doc/library/pathlib.rst:1662 msgid "Matches one non-separator character." -msgstr "" +msgstr "Coincide con un carácter no separador." #: ../Doc/library/pathlib.rst:1663 msgid "``[seq]``" -msgstr "" +msgstr "``[seq]``" #: ../Doc/library/pathlib.rst:1664 msgid "Matches one character in *seq*." -msgstr "" +msgstr "Coincide con un carácter en *seq*." #: ../Doc/library/pathlib.rst:1666 msgid "``[!seq]``" -msgstr "" +msgstr "``[!seq]``" #: ../Doc/library/pathlib.rst:1666 msgid "Matches one character not in *seq*." -msgstr "" +msgstr "Coincide con un carácter que no está en *seq*." #: ../Doc/library/pathlib.rst:1668 msgid "" "For a literal match, wrap the meta-characters in brackets. For example, " "``\"[?]\"`` matches the character ``\"?\"``." msgstr "" +"Para una coincidencia literal, encierre los metacaracteres entre corchetes. " +"Por ejemplo, ``\"[?]\"`` coincide con el carácter ``\"?\"``." #: ../Doc/library/pathlib.rst:1671 msgid "The \"``**``\" wildcard enables recursive globbing. A few examples:" msgstr "" +"El comodín \"``**``\" permite la codificación recursiva. Algunos ejemplos:" #: ../Doc/library/pathlib.rst:1674 msgid "Pattern" -msgstr "" +msgstr "Patrón" #: ../Doc/library/pathlib.rst:1674 msgid "Meaning" -msgstr "" +msgstr "Significado" #: ../Doc/library/pathlib.rst:1676 msgid "\"``**/*``\"" -msgstr "" +msgstr "\"``**/*``\"" #: ../Doc/library/pathlib.rst:1676 msgid "Any path with at least one segment." -msgstr "" +msgstr "Cualquier camino con al menos un segmento." #: ../Doc/library/pathlib.rst:1677 msgid "\"``**/*.py``\"" -msgstr "" +msgstr "\"``**/*.py``\"" #: ../Doc/library/pathlib.rst:1677 msgid "Any path with a final segment ending \"``.py``\"." -msgstr "" +msgstr "Cualquier ruta con un segmento final que termine \"``.py``\"." #: ../Doc/library/pathlib.rst:1678 msgid "\"``assets/**``\"" -msgstr "" +msgstr "\"``assets/**``\"" #: ../Doc/library/pathlib.rst:1678 msgid "Any path starting with \"``assets/``\"." -msgstr "" +msgstr "Cualquier ruta que comience con \"``assets/``\"." #: ../Doc/library/pathlib.rst:1679 msgid "\"``assets/**/*``\"" -msgstr "" +msgstr "\"``assets/**/*``\"" #: ../Doc/library/pathlib.rst:1679 msgid "" "Any path starting with \"``assets/``\", excluding \"``assets/``\" itself." msgstr "" +"Cualquier ruta que comience con \"``assets/``\", excluyendo \"``assets/``\" " +"en sí." #: ../Doc/library/pathlib.rst:1683 msgid "" "Globbing with the \"``**``\" wildcard visits every directory in the tree. " "Large directory trees may take a long time to search." msgstr "" +"Al utilizar el comodín \"``**``\", se visitan todos los directorios del " +"árbol. Las búsquedas en árboles de directorios grandes pueden llevar mucho " +"tiempo." #: ../Doc/library/pathlib.rst:1686 msgid "" "Globbing with a pattern that ends with \"``**``\" returns both files and " "directories. In previous versions, only directories were returned." msgstr "" +"La codificación con un patrón que termina en \"``**``\" devuelve tanto " +"archivos como directorios. En versiones anteriores, solo se devolvían " +"directorios." #: ../Doc/library/pathlib.rst:1690 msgid "" "In :meth:`Path.glob` and :meth:`~Path.rglob`, a trailing slash may be added " "to the pattern to match only directories." msgstr "" +"En :meth:`Path.glob` y :meth:`~Path.rglob`, se puede agregar una barra " +"diagonal final al patrón para que coincida solo con directorios." #: ../Doc/library/pathlib.rst:1693 -#, fuzzy msgid "" "Globbing with a pattern that ends with a pathname components separator (:" "data:`~os.sep` or :data:`~os.altsep`) returns only directories." msgstr "" -"Retorna solo directorios si *pattern* termina con un separador de " -"componentes de nombre de ruta (:data:`~os.sep` o :data:`~os.altsep`)." +"El uso de un patrón que termina con un separador de componentes de ruta de " +"acceso (:data:`~os.sep` o :data:`~os.altsep`) solo devuelve directorios." #: ../Doc/library/pathlib.rst:1699 -#, fuzzy msgid "Comparison to the :mod:`glob` module" -msgstr "Correspondencia a herramientas en el módulo :mod:`os`" +msgstr "Comparación con el módulo :mod:`glob`" #: ../Doc/library/pathlib.rst:1701 msgid "" "The patterns accepted and results generated by :meth:`Path.glob` and :meth:" "`Path.rglob` differ slightly from those by the :mod:`glob` module:" msgstr "" +"Los patrones aceptados y los resultados generados por :meth:`Path.glob` y :" +"meth:`Path.rglob` difieren ligeramente de los del módulo :mod:`glob`:" #: ../Doc/library/pathlib.rst:1704 msgid "" "Files beginning with a dot are not special in pathlib. This is like passing " "``include_hidden=True`` to :func:`glob.glob`." msgstr "" +"Los archivos que comienzan con un punto no son especiales en pathlib. Es " +"como pasar ``include_hidden=True`` a :func:`glob.glob`." #: ../Doc/library/pathlib.rst:1706 msgid "" "\"``**``\" pattern components are always recursive in pathlib. This is like " "passing ``recursive=True`` to :func:`glob.glob`." msgstr "" +"Los componentes del patrón \"``**``\" siempre son recursivos en pathlib. " +"Esto es como pasar ``recursive=True`` a :func:`glob.glob`." #: ../Doc/library/pathlib.rst:1708 msgid "" @@ -2646,12 +3148,19 @@ msgid "" "This behaviour has no equivalent in :func:`glob.glob`, but you can pass " "``recurse_symlinks=True`` to :meth:`Path.glob` for compatible behaviour." msgstr "" +"Los componentes del patrón \"``**``\" no siguen los enlaces simbólicos de " +"forma predeterminada en pathlib. Este comportamiento no tiene equivalente " +"en :func:`glob.glob`, pero puede pasar ``recurse_symlinks=True`` a :meth:" +"`Path.glob` para lograr un comportamiento compatible." #: ../Doc/library/pathlib.rst:1711 msgid "" "Like all :class:`PurePath` and :class:`Path` objects, the values returned " "from :meth:`Path.glob` and :meth:`Path.rglob` don't include trailing slashes." msgstr "" +"Al igual que todos los objetos :class:`PurePath` y :class:`Path`, los " +"valores devueltos por :meth:`Path.glob` y :meth:`Path.rglob` no incluyen " +"barras diagonales finales." #: ../Doc/library/pathlib.rst:1714 msgid "" @@ -2659,6 +3168,9 @@ msgid "" "include the *path* as a prefix, unlike the results of ``glob." "glob(root_dir=path)``." msgstr "" +"Los valores devueltos de ``path.glob()`` y ``path.rglob()`` de pathlib " +"incluyen *path* como prefijo, a diferencia de los resultados de ``glob." +"glob(root_dir=path)``." #: ../Doc/library/pathlib.rst:1717 msgid "" @@ -2667,11 +3179,14 @@ msgid "" "results of ``glob.glob(root_dir=path)`` never include an empty string that " "would correspond to *path*." msgstr "" +"Los valores devueltos de ``path.glob()`` y ``path.rglob()`` de pathlib " +"pueden incluir el propio *path*, por ejemplo, al incluir \"``**``\", " +"mientras que los resultados de ``glob.glob(root_dir=path)`` nunca incluyen " +"una cadena vacía que corresponda a *path*." #: ../Doc/library/pathlib.rst:1724 -#, fuzzy msgid "Comparison to the :mod:`os` and :mod:`os.path` modules" -msgstr ":mod:`os` y :mod:`os.path`" +msgstr "Comparación con los módulos :mod:`os` y :mod:`os.path`" #: ../Doc/library/pathlib.rst:1726 msgid "" @@ -2681,6 +3196,12 @@ msgid "" "level ``str`` and ``bytes`` objects, which is a more *procedural* approach. " "Some users consider the object-oriented style to be more readable." msgstr "" +"pathlib implementa operaciones de ruta utilizando objetos :class:`PurePath` " +"y :class:`Path`, por lo que se dice que es *object-oriented*. Por otro lado, " +"los módulos :mod:`os` y :mod:`os.path` proporcionan funciones que funcionan " +"con objetos ``str`` y ``bytes`` de bajo nivel, lo que es un enfoque más " +"propio de *procedural*. Algunos usuarios consideran que el estilo orientado " +"a objetos es más legible." #: ../Doc/library/pathlib.rst:1732 msgid "" @@ -2688,6 +3209,9 @@ msgid "" "ref:`paths relative to directory descriptors `. These features " "aren't available in pathlib." msgstr "" +"Muchas funciones de :mod:`os` y :mod:`os.path` admiten rutas ``bytes`` y :" +"ref:`paths relative to directory descriptors `. Estas funciones no " +"están disponibles en pathlib." #: ../Doc/library/pathlib.rst:1736 msgid "" @@ -2695,6 +3219,10 @@ msgid "" "`os.path` modules, are written in C and are very speedy. pathlib is written " "in pure Python and is often slower, but rarely slow enough to matter." msgstr "" +"Los tipos ``str`` y ``bytes`` de Python, y partes de los módulos :mod:`os` " +"y :mod:`os.path`, están escritos en C y son muy rápidos. pathlib está " +"escrito en Python puro y a menudo es más lento, pero rara vez lo " +"suficientemente lento como para ser importante." #: ../Doc/library/pathlib.rst:1740 msgid "" @@ -2704,11 +3232,18 @@ msgid "" "are involved, :meth:`Path.absolute` preserves these segments for greater " "safety." msgstr "" +"La normalización de rutas de pathlib es ligeramente más estricta y " +"consistente que la de :mod:`os.path`. Por ejemplo, mientras que :func:`os." +"path.abspath` elimina los segmentos \"``..``\" de una ruta, que pueden " +"cambiar su significado si hay enlaces simbólicos involucrados, :meth:`Path." +"absolute` conserva estos segmentos para mayor seguridad." #: ../Doc/library/pathlib.rst:1745 msgid "" "pathlib's path normalization may render it unsuitable for some applications:" msgstr "" +"La normalización de rutas de pathlib puede hacer que no sea adecuado para " +"algunas aplicaciones:" #: ../Doc/library/pathlib.rst:1747 msgid "" @@ -2718,6 +3253,11 @@ msgid "" "separator may allow the path to be resolved as either a file or directory, " "rather than a directory only." msgstr "" +"pathlib normaliza ``Path(\"my_folder/\")`` a ``Path(\"my_folder\")``, lo que " +"cambia el significado de una ruta cuando se proporciona a varias API del " +"sistema operativo y utilidades de línea de comandos. En concreto, la " +"ausencia de un separador final puede permitir que la ruta se resuelva como " +"un archivo o directorio, en lugar de solo como un directorio." #: ../Doc/library/pathlib.rst:1752 msgid "" @@ -2727,16 +3267,23 @@ msgid "" "a separator in the path may force it to be looked up in :envvar:`PATH` " "rather than the current directory." msgstr "" +"pathlib normaliza ``Path(\"./my_program\")`` a ``Path(\"my_program\")``, lo " +"que cambia el significado de una ruta cuando se utiliza como ruta de " +"búsqueda ejecutable, como en un shell o al generar un proceso secundario. En " +"concreto, la ausencia de un separador en la ruta puede obligar a que se " +"busque en :envvar:`PATH` en lugar de en el directorio actual." #: ../Doc/library/pathlib.rst:1758 msgid "" "As a consequence of these differences, pathlib is not a drop-in replacement " "for :mod:`os.path`." msgstr "" +"Como consecuencia de estas diferencias, pathlib no es un reemplazo directo " +"para :mod:`os.path`." #: ../Doc/library/pathlib.rst:1763 msgid "Corresponding tools" -msgstr "" +msgstr "Herramientas correspondientes" #: ../Doc/library/pathlib.rst:1765 msgid "" @@ -2775,18 +3322,16 @@ msgid ":func:`os.path.splitext`" msgstr ":func:`os.path.splitext`" #: ../Doc/library/pathlib.rst:1773 -#, fuzzy msgid ":attr:`PurePath.stem`, :attr:`PurePath.suffix`" -msgstr ":attr:`PurePath.stem` y :attr:`PurePath.suffix`" +msgstr ":attr:`PurePath.stem`, :attr:`PurePath.suffix`" #: ../Doc/library/pathlib.rst:1774 msgid ":func:`os.path.join`" msgstr ":func:`os.path.join`" #: ../Doc/library/pathlib.rst:1774 -#, fuzzy msgid ":meth:`PurePath.joinpath`" -msgstr ":func:`PurePath.joinpath`" +msgstr ":meth:`PurePath.joinpath`" #: ../Doc/library/pathlib.rst:1775 msgid ":func:`os.path.isabs`" @@ -2801,18 +3346,16 @@ msgid ":func:`os.path.relpath`" msgstr ":func:`os.path.relpath`" #: ../Doc/library/pathlib.rst:1776 -#, fuzzy msgid ":meth:`PurePath.relative_to` [1]_" -msgstr ":meth:`PurePath.relative_to` [#]_" +msgstr ":meth:`PurePath.relative_to` [1]_" #: ../Doc/library/pathlib.rst:1777 msgid ":func:`os.path.expanduser`" msgstr ":func:`os.path.expanduser`" #: ../Doc/library/pathlib.rst:1777 -#, fuzzy msgid ":meth:`Path.expanduser` [2]_" -msgstr ":meth:`Path.absolute` [#]_" +msgstr ":meth:`Path.expanduser` [2]_" #: ../Doc/library/pathlib.rst:1778 msgid ":func:`os.path.realpath`" @@ -2827,9 +3370,8 @@ msgid ":func:`os.path.abspath`" msgstr ":func:`os.path.abspath`" #: ../Doc/library/pathlib.rst:1779 -#, fuzzy msgid ":meth:`Path.absolute` [3]_" -msgstr ":meth:`Path.absolute` [#]_" +msgstr ":meth:`Path.absolute` [3]_" #: ../Doc/library/pathlib.rst:1780 msgid ":func:`os.path.exists`" @@ -2864,24 +3406,20 @@ msgid ":meth:`Path.is_symlink`" msgstr ":meth:`Path.is_symlink`" #: ../Doc/library/pathlib.rst:1784 -#, fuzzy msgid ":func:`os.path.isjunction`" -msgstr ":func:`os.path.islink`" +msgstr ":func:`os.path.isjunction`" #: ../Doc/library/pathlib.rst:1784 -#, fuzzy msgid ":meth:`Path.is_junction`" -msgstr ":meth:`Path.unlink`" +msgstr ":meth:`Path.is_junction`" #: ../Doc/library/pathlib.rst:1785 -#, fuzzy msgid ":func:`os.path.ismount`" -msgstr ":func:`os.path.islink`" +msgstr ":func:`os.path.ismount`" #: ../Doc/library/pathlib.rst:1785 -#, fuzzy msgid ":meth:`Path.is_mount`" -msgstr ":meth:`Path.is_symlink`" +msgstr ":meth:`Path.is_mount`" #: ../Doc/library/pathlib.rst:1786 msgid ":func:`os.path.samefile`" @@ -2896,28 +3434,24 @@ msgid ":func:`os.getcwd`" msgstr ":func:`os.getcwd`" #: ../Doc/library/pathlib.rst:1787 -#, fuzzy msgid ":meth:`Path.cwd`" -msgstr ":meth:`Path.chmod`" +msgstr ":meth:`Path.cwd`" #: ../Doc/library/pathlib.rst:1788 msgid ":func:`os.stat`" msgstr ":func:`os.stat`" #: ../Doc/library/pathlib.rst:1788 -#, fuzzy msgid ":meth:`Path.stat`" -msgstr ":meth:`Path.exists`" +msgstr ":meth:`Path.stat`" #: ../Doc/library/pathlib.rst:1789 -#, fuzzy msgid ":func:`os.lstat`" -msgstr ":func:`os.stat`" +msgstr ":func:`os.lstat`" #: ../Doc/library/pathlib.rst:1789 -#, fuzzy msgid ":meth:`Path.lstat`" -msgstr ":meth:`Path.exists`" +msgstr ":meth:`Path.lstat`" #: ../Doc/library/pathlib.rst:1790 msgid ":func:`os.listdir`" @@ -2932,14 +3466,12 @@ msgid ":func:`os.walk`" msgstr ":func:`os.walk`" #: ../Doc/library/pathlib.rst:1791 -#, fuzzy msgid ":meth:`Path.walk` [4]_" -msgstr ":meth:`Path.walk`" +msgstr ":meth:`Path.walk` [4]_" #: ../Doc/library/pathlib.rst:1792 -#, fuzzy msgid ":func:`os.mkdir`, :func:`os.makedirs`" -msgstr ":func:`os.remove`, :func:`os.unlink`" +msgstr ":func:`os.mkdir`, :func:`os.makedirs`" #: ../Doc/library/pathlib.rst:1792 msgid ":meth:`Path.mkdir`" @@ -3010,14 +3542,12 @@ msgid ":meth:`Path.chmod`" msgstr ":meth:`Path.chmod`" #: ../Doc/library/pathlib.rst:1801 -#, fuzzy msgid ":func:`os.lchmod`" -msgstr ":func:`os.chmod`" +msgstr ":func:`os.lchmod`" #: ../Doc/library/pathlib.rst:1801 -#, fuzzy msgid ":meth:`Path.lchmod`" -msgstr ":meth:`Path.chmod`" +msgstr ":meth:`Path.lchmod`" #: ../Doc/library/pathlib.rst:1805 msgid "Footnotes" @@ -3030,6 +3560,11 @@ msgid "" "is a lexical operation that raises :exc:`ValueError` when its inputs' " "anchors differ (e.g. if one path is absolute and the other relative.)" msgstr "" +":func:`os.path.relpath` llama a :func:`~os.path.abspath` para hacer que las " +"rutas sean absolutas y eliminar partes \"``..``\", mientras que :meth:" +"`PurePath.relative_to` es una operación léxica que genera :exc:`ValueError` " +"cuando los anclajes de sus entradas difieren (por ejemplo, si una ruta es " +"absoluta y la otra relativa)." #: ../Doc/library/pathlib.rst:1810 msgid "" @@ -3037,17 +3572,19 @@ msgid "" "can't be resolved, whereas :meth:`Path.expanduser` raises :exc:" "`RuntimeError`." msgstr "" +":func:`os.path.expanduser` devuelve la ruta sin cambios si no se puede " +"resolver el directorio de inicio, mientras que :meth:`Path.expanduser` " +"genera :exc:`RuntimeError`." #: ../Doc/library/pathlib.rst:1813 -#, fuzzy msgid "" ":func:`os.path.abspath` removes \"``..``\" components without resolving " "symlinks, which may change the meaning of the path, whereas :meth:`Path." "absolute` leaves any \"``..``\" components in the path." msgstr "" -":func:`os.path.abspath` normaliza la ruta resultante, lo cual puede cambiar " -"su significado en presencia de enlaces simbólicos, mientras que :meth:`Path." -"absolute` no lo hace." +":func:`os.path.abspath` elimina los componentes \"``..``\" sin resolver los " +"enlaces simbólicos, lo que puede cambiar el significado de la ruta, mientras " +"que :meth:`Path.absolute` deja cualquier componente \"``..``\" en la ruta." #: ../Doc/library/pathlib.rst:1816 msgid "" @@ -3055,6 +3592,10 @@ msgid "" "*dirnames* and *filenames*, whereas :meth:`Path.walk` categorizes all " "symlinks into *filenames* when *follow_symlinks* is false (the default.)" msgstr "" +":func:`os.walk` siempre sigue los enlaces simbólicos al categorizar rutas en " +"*dirnames* y *filenames*, mientras que :meth:`Path.walk` categoriza todos " +"los enlaces simbólicos en *filenames* cuando *follow_symlinks* es falso (el " +"valor predeterminado)." # Es parte del índice? #: ../Doc/library/pathlib.rst:11 From 4b695122e378a2061f044c2b99a96e42d23564ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Sun, 24 Nov 2024 21:14:37 +0100 Subject: [PATCH 2/2] Add words to dictionary for library/pathlib --- dictionaries/library_pathlib.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dictionaries/library_pathlib.txt b/dictionaries/library_pathlib.txt index 82d64c5efe..d3c337c80f 100644 --- a/dictionaries/library_pathlib.txt +++ b/dictionaries/library_pathlib.txt @@ -1 +1,4 @@ +down +rmdir tripletas +unlink pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy