Changeset 20


Ignore:
Timestamp:
23/06/09 10:20:11 (4 years ago)
Author:
facundobatista
Message:

Seguimos!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/traducidos/modules.rst

    r19 r20  
    245245.. _tut-standardmodules: 
    246246 
    247 Standard Modules 
     247Módulos estándar 
    248248================ 
    249249 
    250250.. index:: module: sys 
    251251 
    252 Python comes with a library of standard modules, described in a separate 
    253 document, the Python Library Reference ("Library Reference" hereafter).  Some 
    254 modules are built into the interpreter; these provide access to operations that 
    255 are not part of the core of the language but are nevertheless built in, either 
    256 for efficiency or to provide access to operating system primitives such as 
    257 system calls.  The set of such modules is a configuration option which also 
    258 depends on the underlying platform For example, the :mod:`winreg` module is only 
    259 provided on Windows systems. One particular module deserves some attention: 
    260 :mod:`sys`, which is built into every Python interpreter.  The variables 
    261 ``sys.ps1`` and ``sys.ps2`` define the strings used as primary and secondary 
    262 prompts:: 
     252Python viene con una biblioteca de módulos estándar, descrita en un documento 
     253separado, la Referencia de la Biblioteca de Python (de aquí en más, "Referencia 
     254de la Biblioteca").  Algunos módulos se integran en el intérprete; estos 
     255proveen acceso a operaciones que no son parte del núcleo del lenguaje pero que 
     256sin embargo están integrados, tanto por eficiencia como para proveer acceso a 
     257primitivas del sistema operativo, como llamadas al sistema.  El conjunto de 
     258tales módulos es una opción de configuración el cual también depende de la 
     259plataforma subyacente.  Por ejemplo, el módulo :mod:`winreg` sólo se provee 
     260en sistemas Windows.  Un módulo en particular merece algo de atención: 
     261:mod:`sys`, el que está integrado en todos los intérpretes de Python.  Las 
     262variables ``sys.ps1`` y ``sys.ps2`` definen las cadenas usadas como cursores 
     263primarios y secundarios:: 
    263264 
    264265   >>> import sys 
     
    273274 
    274275 
    275 These two variables are only defined if the interpreter is in interactive mode. 
    276  
    277 The variable ``sys.path`` is a list of strings that determines the interpreter's 
    278 search path for modules. It is initialized to a default path taken from the 
    279 environment variable :envvar:`PYTHONPATH`, or from a built-in default if 
    280 :envvar:`PYTHONPATH` is not set.  You can modify it using standard list 
    281 operations:: 
     276Estas dos variables están solamente definidas si el intérprete está en modo interactivo. 
     277 
     278La variable  ``sys.path`` es una lista de cadenas que determinan el camino de 
     279búsqueda del intérprete para los módulos.  Se inicializa por omisión a un 
     280camino tomado de la variable de entorno :envvar:`PYTHONPATH`, o a un valor 
     281predefinido en el intérprete si :envvar:`PYTHONPATH` no está configurada.  Lo 
     282podés modificar usando las operaciones estándar de listas:: 
    282283 
    283284   >>> import sys 
Note: See TracChangeset for help on using the changeset viewer.