forked from AFPy/python-docs-fr
Hi, gettext_compact=0.
This commit is contained in:
parent
4d36dfa0db
commit
84e5545ebb
2
about.po
2
about.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-17 21:44+0200\n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
2
bugs.po
2
bugs.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-17 21:44+0200\n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/abstract.rst:7
|
||||
msgid "Abstract Objects Layer"
|
||||
msgstr "Couche d'Abstraction des Objets"
|
||||
|
||||
#: ../Doc/c-api/abstract.rst:9
|
||||
msgid ""
|
||||
"The functions in this chapter interact with Python objects regardless of "
|
||||
"their type, or with wide classes of object types (e.g. all numerical types, "
|
||||
"or all sequence types). When used on object types for which they do not "
|
||||
"apply, they will raise a Python exception."
|
||||
msgstr ""
|
||||
"Dans ce chapitre, les fonctions s'appliquent à des objets Python sans tenir "
|
||||
"compte de leur type, ou des classes d'objets au sens large (par exemple, "
|
||||
"tous les types numériques, ou tous les types de séquence). Quand ils sont "
|
||||
"utilisés sur des types d'objets qui ne correspondent pas, ils lèveront une "
|
||||
"exception Python."
|
||||
|
||||
#: ../Doc/c-api/abstract.rst:14
|
||||
msgid ""
|
||||
"It is not possible to use these functions on objects that are not properly "
|
||||
"initialized, such as a list object that has been created by :c:func:"
|
||||
"`PyList_New`, but whose items have not been set to some non-\\ ``NULL`` "
|
||||
"value yet."
|
||||
msgstr ""
|
||||
"Il n'est pas possible d'utiliser ces fonctions sur des objets qui n'ont pas "
|
||||
"été correctement initialisés, comme un objet liste qui a été créé avec :c:"
|
||||
"func:`PyList_New` mais dont les éléments n'ont pas encore été mis à une "
|
||||
"valeur non-\\ ``NULL``."
|
|
@ -0,0 +1,86 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/allocation.rst:6
|
||||
msgid "Allocating Objects on the Heap"
|
||||
msgstr "Allouer des objets dans le tas"
|
||||
|
||||
#: ../Doc/c-api/allocation.rst:17
|
||||
msgid ""
|
||||
"Initialize a newly-allocated object *op* with its type and initial "
|
||||
"reference. Returns the initialized object. If *type* indicates that the "
|
||||
"object participates in the cyclic garbage detector, it is added to the "
|
||||
"detector's set of observed objects. Other fields of the object are not "
|
||||
"affected."
|
||||
msgstr ""
|
||||
"Permet d'initialiser un objet *op* nouvellement alloué ainsi que son type et "
|
||||
"sa référence initiale. Retourne l'objet initialisé. La présence de *type* "
|
||||
"indique que l'objet doit être traité par le détecteur d'ordures cycliques, "
|
||||
"il est de ce fait ajouté à l'ensemble du détecteur d'objets observés. Les "
|
||||
"autres champs de l'objet ne sont pas affectés."
|
||||
|
||||
#: ../Doc/c-api/allocation.rst:26
|
||||
msgid ""
|
||||
"This does everything :c:func:`PyObject_Init` does, and also initializes the "
|
||||
"length information for a variable-size object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/allocation.rst:32
|
||||
msgid ""
|
||||
"Allocate a new Python object using the C structure type *TYPE* and the "
|
||||
"Python type object *type*. Fields not defined by the Python object header "
|
||||
"are not initialized; the object's reference count will be one. The size of "
|
||||
"the memory allocation is determined from the :c:member:`~PyTypeObject."
|
||||
"tp_basicsize` field of the type object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/allocation.rst:41
|
||||
msgid ""
|
||||
"Allocate a new Python object using the C structure type *TYPE* and the "
|
||||
"Python type object *type*. Fields not defined by the Python object header "
|
||||
"are not initialized. The allocated memory allows for the *TYPE* structure "
|
||||
"plus *size* fields of the size given by the :c:member:`~PyTypeObject."
|
||||
"tp_itemsize` field of *type*. This is useful for implementing objects like "
|
||||
"tuples, which are able to determine their size at construction time. "
|
||||
"Embedding the array of fields into the same allocation decreases the number "
|
||||
"of allocations, improving the memory management efficiency."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/allocation.rst:53
|
||||
msgid ""
|
||||
"Releases memory allocated to an object using :c:func:`PyObject_New` or :c:"
|
||||
"func:`PyObject_NewVar`. This is normally called from the :c:member:"
|
||||
"`~PyTypeObject.tp_dealloc` handler specified in the object's type. The "
|
||||
"fields of the object should not be accessed after this call as the memory is "
|
||||
"no longer a valid Python object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/allocation.rst:62
|
||||
msgid ""
|
||||
"Object which is visible in Python as ``None``. This should only be accessed "
|
||||
"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this "
|
||||
"object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/allocation.rst:69
|
||||
msgid ":c:func:`PyModule_Create`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/allocation.rst:70
|
||||
msgid "To allocate and create extension modules."
|
||||
msgstr "Allouer et créer des modules d'extension."
|
|
@ -0,0 +1,112 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:7
|
||||
msgid "API and ABI Versioning"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:9
|
||||
msgid ""
|
||||
"``PY_VERSION_HEX`` is the Python version number encoded in a single integer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:11
|
||||
msgid ""
|
||||
"For example if the ``PY_VERSION_HEX`` is set to ``0x030401a2``, the "
|
||||
"underlying version information can be found by treating it as a 32 bit "
|
||||
"number in the following manner:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:16
|
||||
msgid "Bytes"
|
||||
msgstr "Bytes"
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:16
|
||||
msgid "Bits (big endian order)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:16
|
||||
msgid "Meaning"
|
||||
msgstr "Signification"
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:18
|
||||
msgid "``1``"
|
||||
msgstr "``1``"
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:18
|
||||
msgid "``1-8``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:18
|
||||
msgid "``PY_MAJOR_VERSION`` (the ``3`` in ``3.4.1a2``)"
|
||||
msgstr "``PY_MAJOR_VERSION`` (le ``3`` dans ``3.4.1a2``)"
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:21
|
||||
msgid "``2``"
|
||||
msgstr "``2``"
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:21
|
||||
msgid "``9-16``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:21
|
||||
msgid "``PY_MINOR_VERSION`` (the ``4`` in ``3.4.1a2``)"
|
||||
msgstr "``PY_MINOR_VERSION`` (le ``4`` dans ``3.4.1a2``)"
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:24
|
||||
msgid "``3``"
|
||||
msgstr "``3``"
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:24
|
||||
msgid "``17-24``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:24
|
||||
msgid "``PY_MICRO_VERSION`` (the ``1`` in ``3.4.1a2``)"
|
||||
msgstr "``PY_MICRO_VERSION`` (le ``1`` dans ``3.4.1a2``)"
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:27
|
||||
msgid "``4``"
|
||||
msgstr "``4``"
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:27
|
||||
msgid "``25-28``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:27
|
||||
msgid ""
|
||||
"``PY_RELEASE_LEVEL`` (``0xA`` for alpha, ``0xB`` for beta, ``0xC`` for "
|
||||
"release candidate and ``0xF`` for final), in this case it is alpha."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:32
|
||||
msgid "``29-32``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:32
|
||||
msgid ""
|
||||
"``PY_RELEASE_SERIAL`` (the ``2`` in ``3.4.1a2``, zero for final releases)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:36
|
||||
msgid "Thus ``3.4.1a2`` is hexversion ``0x030401a2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/apiabiversion.rst:38
|
||||
msgid "All the given macros are defined in :source:`Include/patchlevel.h`."
|
||||
msgstr ""
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,68 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/bool.rst:6
|
||||
msgid "Boolean Objects"
|
||||
msgstr "Les objets booléens"
|
||||
|
||||
#: ../Doc/c-api/bool.rst:8
|
||||
msgid ""
|
||||
"Booleans in Python are implemented as a subclass of integers. There are "
|
||||
"only two booleans, :const:`Py_False` and :const:`Py_True`. As such, the "
|
||||
"normal creation and deletion functions don't apply to booleans. The "
|
||||
"following macros are available, however."
|
||||
msgstr ""
|
||||
"Les booléens en Python sont implémentés comme une classe dérivée des "
|
||||
"entiers. Il y a seulement deux booléens, :const:`Py_False` et :const:"
|
||||
"`Py_True`. Comme tel, les fonctions de création de suppression ne "
|
||||
"s'appliquent pas aux booléens. Toutefois, les macros suivantes sont "
|
||||
"disponibles."
|
||||
|
||||
#: ../Doc/c-api/bool.rst:16
|
||||
msgid "Return true if *o* is of type :c:data:`PyBool_Type`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bool.rst:21
|
||||
msgid ""
|
||||
"The Python ``False`` object. This object has no methods. It needs to be "
|
||||
"treated just like any other object with respect to reference counts."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bool.rst:27
|
||||
msgid ""
|
||||
"The Python ``True`` object. This object has no methods. It needs to be "
|
||||
"treated just like any other object with respect to reference counts."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bool.rst:33
|
||||
msgid ""
|
||||
"Return :const:`Py_False` from a function, properly incrementing its "
|
||||
"reference count."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bool.rst:39
|
||||
msgid ""
|
||||
"Return :const:`Py_True` from a function, properly incrementing its reference "
|
||||
"count."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bool.rst:45
|
||||
msgid ""
|
||||
"Return a new reference to :const:`Py_True` or :const:`Py_False` depending on "
|
||||
"the truth value of *v*."
|
||||
msgstr ""
|
|
@ -0,0 +1,654 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:11
|
||||
msgid "Buffer Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:18
|
||||
msgid ""
|
||||
"Certain objects available in Python wrap access to an underlying memory "
|
||||
"array or *buffer*. Such objects include the built-in :class:`bytes` and :"
|
||||
"class:`bytearray`, and some extension types like :class:`array.array`. Third-"
|
||||
"party libraries may define their own types for special purposes, such as "
|
||||
"image processing or numeric analysis."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:24
|
||||
msgid ""
|
||||
"While each of these types have their own semantics, they share the common "
|
||||
"characteristic of being backed by a possibly large memory buffer. It is "
|
||||
"then desirable, in some situations, to access that buffer directly and "
|
||||
"without intermediate copying."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:29
|
||||
msgid ""
|
||||
"Python provides such a facility at the C level in the form of the :ref:"
|
||||
"`buffer protocol <bufferobjects>`. This protocol has two sides:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:34
|
||||
msgid ""
|
||||
"on the producer side, a type can export a \"buffer interface\" which allows "
|
||||
"objects of that type to expose information about their underlying buffer. "
|
||||
"This interface is described in the section :ref:`buffer-structs`;"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:38
|
||||
msgid ""
|
||||
"on the consumer side, several means are available to obtain a pointer to the "
|
||||
"raw underlying data of an object (for example a method parameter)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:41
|
||||
msgid ""
|
||||
"Simple objects such as :class:`bytes` and :class:`bytearray` expose their "
|
||||
"underlying buffer in byte-oriented form. Other forms are possible; for "
|
||||
"example, the elements exposed by an :class:`array.array` can be multi-byte "
|
||||
"values."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:45
|
||||
msgid ""
|
||||
"An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase."
|
||||
"write` method of file objects: any object that can export a series of bytes "
|
||||
"through the buffer interface can be written to a file. While :meth:`write` "
|
||||
"only needs read-only access to the internal contents of the object passed to "
|
||||
"it, other methods such as :meth:`~io.BufferedIOBase.readinto` need write "
|
||||
"access to the contents of their argument. The buffer interface allows "
|
||||
"objects to selectively allow or reject exporting of read-write and read-only "
|
||||
"buffers."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:53
|
||||
msgid ""
|
||||
"There are two ways for a consumer of the buffer interface to acquire a "
|
||||
"buffer over a target object:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:56
|
||||
msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:58
|
||||
msgid ""
|
||||
"call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the "
|
||||
"``y*``, ``w*`` or ``s*`` :ref:`format codes <arg-parsing>`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:61
|
||||
msgid ""
|
||||
"In both cases, :c:func:`PyBuffer_Release` must be called when the buffer "
|
||||
"isn't needed anymore. Failure to do so could lead to various issues such as "
|
||||
"resource leaks."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:69
|
||||
msgid "Buffer structure"
|
||||
msgstr "La structure *buffer*"
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:71
|
||||
msgid ""
|
||||
"Buffer structures (or simply \"buffers\") are useful as a way to expose the "
|
||||
"binary data from another object to the Python programmer. They can also be "
|
||||
"used as a zero-copy slicing mechanism. Using their ability to reference a "
|
||||
"block of memory, it is possible to expose any data to the Python programmer "
|
||||
"quite easily. The memory could be a large, constant array in a C extension, "
|
||||
"it could be a raw block of memory for manipulation before passing to an "
|
||||
"operating system library, or it could be used to pass around structured data "
|
||||
"in its native, in-memory format."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:80
|
||||
msgid ""
|
||||
"Contrary to most data types exposed by the Python interpreter, buffers are "
|
||||
"not :c:type:`PyObject` pointers but rather simple C structures. This allows "
|
||||
"them to be created and copied very simply. When a generic wrapper around a "
|
||||
"buffer is needed, a :ref:`memoryview <memoryview-objects>` object can be "
|
||||
"created."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:86
|
||||
msgid ""
|
||||
"For short instructions how to write an exporting object, see :ref:`Buffer "
|
||||
"Object Structures <buffer-structs>`. For obtaining a buffer, see :c:func:"
|
||||
"`PyObject_GetBuffer`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:94
|
||||
msgid ""
|
||||
"A pointer to the start of the logical structure described by the buffer "
|
||||
"fields. This can be any location within the underlying physical memory block "
|
||||
"of the exporter. For example, with negative :c:member:`~Py_buffer.strides` "
|
||||
"the value may point to the end of the memory block."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:99
|
||||
msgid ""
|
||||
"For :term:`contiguous` arrays, the value points to the beginning of the "
|
||||
"memory block."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:104
|
||||
msgid ""
|
||||
"A new reference to the exporting object. The reference is owned by the "
|
||||
"consumer and automatically decremented and set to *NULL* by :c:func:"
|
||||
"`PyBuffer_Release`. The field is the equivalent of the return value of any "
|
||||
"standard C-API function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:109
|
||||
msgid ""
|
||||
"As a special case, for *temporary* buffers that are wrapped by :c:func:"
|
||||
"`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this field is "
|
||||
"*NULL*. In general, exporting objects MUST NOT use this scheme."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:116
|
||||
msgid ""
|
||||
"``product(shape) * itemsize``. For contiguous arrays, this is the length of "
|
||||
"the underlying memory block. For non-contiguous arrays, it is the length "
|
||||
"that the logical structure would have if it were copied to a contiguous "
|
||||
"representation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:121
|
||||
msgid ""
|
||||
"Accessing ``((char *)buf)[0] up to ((char *)buf)[len-1]`` is only valid if "
|
||||
"the buffer has been obtained by a request that guarantees contiguity. In "
|
||||
"most cases such a request will be :c:macro:`PyBUF_SIMPLE` or :c:macro:"
|
||||
"`PyBUF_WRITABLE`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:127
|
||||
msgid ""
|
||||
"An indicator of whether the buffer is read-only. This field is controlled by "
|
||||
"the :c:macro:`PyBUF_WRITABLE` flag."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:132
|
||||
msgid ""
|
||||
"Item size in bytes of a single element. Same as the value of :func:`struct."
|
||||
"calcsize` called on non-NULL :c:member:`~Py_buffer.format` values."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:135
|
||||
msgid ""
|
||||
"Important exception: If a consumer requests a buffer without the :c:macro:"
|
||||
"`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will be set to *NULL*, "
|
||||
"but :c:member:`~Py_buffer.itemsize` still has the value for the original "
|
||||
"format."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:140
|
||||
msgid ""
|
||||
"If :c:member:`~Py_buffer.shape` is present, the equality ``product(shape) * "
|
||||
"itemsize == len`` still holds and the consumer can use :c:member:`~Py_buffer."
|
||||
"itemsize` to navigate the buffer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:144
|
||||
msgid ""
|
||||
"If :c:member:`~Py_buffer.shape` is *NULL* as a result of a :c:macro:"
|
||||
"`PyBUF_SIMPLE` or a :c:macro:`PyBUF_WRITABLE` request, the consumer must "
|
||||
"disregard :c:member:`~Py_buffer.itemsize` and assume ``itemsize == 1``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:150
|
||||
msgid ""
|
||||
"A *NUL* terminated string in :mod:`struct` module style syntax describing "
|
||||
"the contents of a single item. If this is *NULL*, ``\"B\"`` (unsigned bytes) "
|
||||
"is assumed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:154
|
||||
msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:158
|
||||
msgid ""
|
||||
"The number of dimensions the memory represents as an n-dimensional array. If "
|
||||
"it is 0, :c:member:`~Py_buffer.buf` points to a single item representing a "
|
||||
"scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer."
|
||||
"strides` and :c:member:`~Py_buffer.suboffsets` MUST be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:163
|
||||
msgid ""
|
||||
"The macro :c:macro:`PyBUF_MAX_NDIM` limits the maximum number of dimensions "
|
||||
"to 64. Exporters MUST respect this limit, consumers of multi-dimensional "
|
||||
"buffers SHOULD be able to handle up to :c:macro:`PyBUF_MAX_NDIM` dimensions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:169
|
||||
msgid ""
|
||||
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` "
|
||||
"indicating the shape of the memory as an n-dimensional array. Note that "
|
||||
"``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to :c:member:"
|
||||
"`~Py_buffer.len`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:174
|
||||
msgid ""
|
||||
"Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == 0`` "
|
||||
"requires special attention. See `complex arrays`_ for further information."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:178
|
||||
msgid "The shape array is read-only for the consumer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:182
|
||||
msgid ""
|
||||
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` "
|
||||
"giving the number of bytes to skip to get to a new element in each dimension."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:186
|
||||
msgid ""
|
||||
"Stride values can be any integer. For regular arrays, strides are usually "
|
||||
"positive, but a consumer MUST be able to handle the case ``strides[n] <= "
|
||||
"0``. See `complex arrays`_ for further information."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:190
|
||||
msgid "The strides array is read-only for the consumer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:194
|
||||
msgid ""
|
||||
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`. If "
|
||||
"``suboffsets[n] >= 0``, the values stored along the nth dimension are "
|
||||
"pointers and the suboffset value dictates how many bytes to add to each "
|
||||
"pointer after de-referencing. A suboffset value that is negative indicates "
|
||||
"that no de-referencing should occur (striding in a contiguous memory block)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:201
|
||||
msgid ""
|
||||
"If all suboffsets are negative (i.e. no de-referencing is needed, then this "
|
||||
"field must be NULL (the default value)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:204
|
||||
msgid ""
|
||||
"This type of array representation is used by the Python Imaging Library "
|
||||
"(PIL). See `complex arrays`_ for further information how to access elements "
|
||||
"of such an array."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:208
|
||||
msgid "The suboffsets array is read-only for the consumer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:212
|
||||
msgid ""
|
||||
"This is for use internally by the exporting object. For example, this might "
|
||||
"be re-cast as an integer by the exporter and used to store flags about "
|
||||
"whether or not the shape, strides, and suboffsets arrays must be freed when "
|
||||
"the buffer is released. The consumer MUST NOT alter this value."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:221
|
||||
msgid "Buffer request types"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:223
|
||||
msgid ""
|
||||
"Buffers are usually obtained by sending a buffer request to an exporting "
|
||||
"object via :c:func:`PyObject_GetBuffer`. Since the complexity of the logical "
|
||||
"structure of the memory can vary drastically, the consumer uses the *flags* "
|
||||
"argument to specify the exact buffer type it can handle."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:228
|
||||
msgid ""
|
||||
"All :c:data:`Py_buffer` fields are unambiguously defined by the request type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:232
|
||||
msgid "request-independent fields"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:233
|
||||
msgid ""
|
||||
"The following fields are not influenced by *flags* and must always be filled "
|
||||
"in with the correct values: :c:member:`~Py_buffer.obj`, :c:member:"
|
||||
"`~Py_buffer.buf`, :c:member:`~Py_buffer.len`, :c:member:`~Py_buffer."
|
||||
"itemsize`, :c:member:`~Py_buffer.ndim`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:239
|
||||
msgid "readonly, format"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:243
|
||||
msgid ""
|
||||
"Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter "
|
||||
"MUST provide a writable buffer or else report failure. Otherwise, the "
|
||||
"exporter MAY provide either a read-only or writable buffer, but the choice "
|
||||
"MUST be consistent for all consumers."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:250
|
||||
msgid ""
|
||||
"Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST be "
|
||||
"filled in correctly. Otherwise, this field MUST be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:254
|
||||
msgid ""
|
||||
":c:macro:`PyBUF_WRITABLE` can be \\|'d to any of the flags in the next "
|
||||
"section. Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:"
|
||||
"`PyBUF_WRITABLE` can be used as a stand-alone flag to request a simple "
|
||||
"writable buffer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:258
|
||||
msgid ""
|
||||
":c:macro:`PyBUF_FORMAT` can be \\|'d to any of the flags except :c:macro:"
|
||||
"`PyBUF_SIMPLE`. The latter already implies format ``B`` (unsigned bytes)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:263
|
||||
msgid "shape, strides, suboffsets"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:265
|
||||
msgid ""
|
||||
"The flags that control the logical structure of the memory are listed in "
|
||||
"decreasing order of complexity. Note that each flag contains all bits of the "
|
||||
"flags below it."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:272 ../Doc/c-api/buffer.rst:296
|
||||
#: ../Doc/c-api/buffer.rst:321
|
||||
msgid "Request"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:272 ../Doc/c-api/buffer.rst:296
|
||||
#: ../Doc/c-api/buffer.rst:321
|
||||
msgid "shape"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:272 ../Doc/c-api/buffer.rst:296
|
||||
#: ../Doc/c-api/buffer.rst:321
|
||||
msgid "strides"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:272 ../Doc/c-api/buffer.rst:296
|
||||
#: ../Doc/c-api/buffer.rst:321
|
||||
msgid "suboffsets"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:274 ../Doc/c-api/buffer.rst:276
|
||||
#: ../Doc/c-api/buffer.rst:278 ../Doc/c-api/buffer.rst:298
|
||||
#: ../Doc/c-api/buffer.rst:300 ../Doc/c-api/buffer.rst:302
|
||||
#: ../Doc/c-api/buffer.rst:304 ../Doc/c-api/buffer.rst:323
|
||||
#: ../Doc/c-api/buffer.rst:325 ../Doc/c-api/buffer.rst:327
|
||||
#: ../Doc/c-api/buffer.rst:329 ../Doc/c-api/buffer.rst:331
|
||||
#: ../Doc/c-api/buffer.rst:333 ../Doc/c-api/buffer.rst:335
|
||||
#: ../Doc/c-api/buffer.rst:337
|
||||
msgid "yes"
|
||||
msgstr "oui"
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:274 ../Doc/c-api/buffer.rst:323
|
||||
#: ../Doc/c-api/buffer.rst:325
|
||||
msgid "if needed"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:276 ../Doc/c-api/buffer.rst:278
|
||||
#: ../Doc/c-api/buffer.rst:280 ../Doc/c-api/buffer.rst:298
|
||||
#: ../Doc/c-api/buffer.rst:300 ../Doc/c-api/buffer.rst:302
|
||||
#: ../Doc/c-api/buffer.rst:304 ../Doc/c-api/buffer.rst:327
|
||||
#: ../Doc/c-api/buffer.rst:329 ../Doc/c-api/buffer.rst:331
|
||||
#: ../Doc/c-api/buffer.rst:333 ../Doc/c-api/buffer.rst:335
|
||||
#: ../Doc/c-api/buffer.rst:337
|
||||
msgid "NULL"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:287
|
||||
msgid "contiguity requests"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:289
|
||||
msgid ""
|
||||
"C or Fortran :term:`contiguity <contiguous>` can be explicitly requested, "
|
||||
"with and without stride information. Without stride information, the buffer "
|
||||
"must be C-contiguous."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:296 ../Doc/c-api/buffer.rst:321
|
||||
msgid "contig"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:298 ../Doc/c-api/buffer.rst:304
|
||||
#: ../Doc/c-api/buffer.rst:335 ../Doc/c-api/buffer.rst:337
|
||||
msgid "C"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:300
|
||||
msgid "F"
|
||||
msgstr "F"
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:302
|
||||
msgid "C or F"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:309
|
||||
msgid "compound requests"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:311
|
||||
msgid ""
|
||||
"All possible requests are fully defined by some combination of the flags in "
|
||||
"the previous section. For convenience, the buffer protocol provides "
|
||||
"frequently used combinations as single flags."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:315
|
||||
msgid ""
|
||||
"In the following table *U* stands for undefined contiguity. The consumer "
|
||||
"would have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:321
|
||||
msgid "readonly"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:321
|
||||
msgid "format"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:323 ../Doc/c-api/buffer.rst:325
|
||||
#: ../Doc/c-api/buffer.rst:327 ../Doc/c-api/buffer.rst:329
|
||||
#: ../Doc/c-api/buffer.rst:331 ../Doc/c-api/buffer.rst:333
|
||||
msgid "U"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:323 ../Doc/c-api/buffer.rst:327
|
||||
#: ../Doc/c-api/buffer.rst:331 ../Doc/c-api/buffer.rst:335
|
||||
msgid "0"
|
||||
msgstr "0"
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:325 ../Doc/c-api/buffer.rst:329
|
||||
#: ../Doc/c-api/buffer.rst:333 ../Doc/c-api/buffer.rst:337
|
||||
msgid "1 or 0"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:342
|
||||
msgid "Complex arrays"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:345
|
||||
msgid "NumPy-style: shape and strides"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:347
|
||||
msgid ""
|
||||
"The logical structure of NumPy-style arrays is defined by :c:member:"
|
||||
"`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer."
|
||||
"shape` and :c:member:`~Py_buffer.strides`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:350
|
||||
msgid ""
|
||||
"If ``ndim == 0``, the memory location pointed to by :c:member:`~Py_buffer."
|
||||
"buf` is interpreted as a scalar of size :c:member:`~Py_buffer.itemsize`. In "
|
||||
"that case, both :c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer."
|
||||
"strides` are *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:354
|
||||
msgid ""
|
||||
"If :c:member:`~Py_buffer.strides` is *NULL*, the array is interpreted as a "
|
||||
"standard n-dimensional C-array. Otherwise, the consumer must access an n-"
|
||||
"dimensional array as follows:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:358
|
||||
msgid ""
|
||||
"``ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * "
|
||||
"strides[n-1]`` ``item = *((typeof(item) *)ptr);``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:362
|
||||
msgid ""
|
||||
"As noted above, :c:member:`~Py_buffer.buf` can point to any location within "
|
||||
"the actual memory block. An exporter can check the validity of a buffer with "
|
||||
"this function:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:396
|
||||
msgid "PIL-style: shape, strides and suboffsets"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:398
|
||||
msgid ""
|
||||
"In addition to the regular items, PIL-style arrays can contain pointers that "
|
||||
"must be followed in order to get to the next element in a dimension. For "
|
||||
"example, the regular three-dimensional C-array ``char v[2][2][3]`` can also "
|
||||
"be viewed as an array of 2 pointers to 2 two-dimensional arrays: ``char "
|
||||
"(*v[2])[2][3]``. In suboffsets representation, those two pointers can be "
|
||||
"embedded at the start of :c:member:`~Py_buffer.buf`, pointing to two ``char "
|
||||
"x[2][3]`` arrays that can be located anywhere in memory."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:407
|
||||
msgid ""
|
||||
"Here is a function that returns a pointer to the element in an N-D array "
|
||||
"pointed to by an N-dimensional index when there are both non-NULL strides "
|
||||
"and suboffsets::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:426
|
||||
msgid "Buffer-related functions"
|
||||
msgstr "Fonctions relatives aux buffers"
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:430
|
||||
msgid ""
|
||||
"Return 1 if *obj* supports the buffer interface otherwise 0. When 1 is "
|
||||
"returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` will "
|
||||
"succeed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:437
|
||||
msgid ""
|
||||
"Send a request to *exporter* to fill in *view* as specified by *flags*. If "
|
||||
"the exporter cannot provide a buffer of the exact type, it MUST raise :c:"
|
||||
"data:`PyExc_BufferError`, set :c:member:`view->obj` to *NULL* and return -1."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:442
|
||||
msgid ""
|
||||
"On success, fill in *view*, set :c:member:`view->obj` to a new reference to "
|
||||
"*exporter* and return 0. In the case of chained buffer providers that "
|
||||
"redirect requests to a single object, :c:member:`view->obj` MAY refer to "
|
||||
"this object instead of *exporter* (See :ref:`Buffer Object Structures "
|
||||
"<buffer-structs>`)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:447
|
||||
msgid ""
|
||||
"Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls "
|
||||
"to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` and :c:func:"
|
||||
"`free`. Thus, after the consumer is done with the buffer, :c:func:"
|
||||
"`PyBuffer_Release` must be called exactly once."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:455
|
||||
msgid ""
|
||||
"Release the buffer *view* and decrement the reference count for :c:member:"
|
||||
"`view->obj`. This function MUST be called when the buffer is no longer being "
|
||||
"used, otherwise reference leaks may occur."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:459
|
||||
msgid ""
|
||||
"It is an error to call this function on a buffer that was not obtained via :"
|
||||
"c:func:`PyObject_GetBuffer`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:465
|
||||
msgid ""
|
||||
"Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer."
|
||||
"format`. This function is not yet implemented."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:471
|
||||
msgid ""
|
||||
"Return 1 if the memory defined by the *view* is C-style (*order* is ``'C'``) "
|
||||
"or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either one "
|
||||
"(*order* is ``'A'``). Return 0 otherwise."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:478
|
||||
msgid ""
|
||||
"Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style "
|
||||
"if *order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the "
|
||||
"given shape with the given number of bytes per element."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:485
|
||||
msgid ""
|
||||
"Handle buffer requests for an exporter that wants to expose *buf* of size "
|
||||
"*len* with writability set according to *readonly*. *buf* is interpreted as "
|
||||
"a sequence of unsigned bytes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:489
|
||||
msgid ""
|
||||
"The *flags* argument indicates the request type. This function always fills "
|
||||
"in *view* as specified by flags, unless *buf* has been designated as read-"
|
||||
"only and :c:macro:`PyBUF_WRITABLE` is set in *flags*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:493
|
||||
msgid ""
|
||||
"On success, set :c:member:`view->obj` to a new reference to *exporter* and "
|
||||
"return 0. Otherwise, raise :c:data:`PyExc_BufferError`, set :c:member:`view-"
|
||||
">obj` to *NULL* and return -1;"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/buffer.rst:497
|
||||
msgid ""
|
||||
"If this function is used as part of a :ref:`getbufferproc <buffer-structs>`, "
|
||||
"*exporter* MUST be set to the exporting object and *flags* must be passed "
|
||||
"unmodified. Otherwise, *exporter* MUST be NULL."
|
||||
msgstr ""
|
|
@ -0,0 +1,101 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:6
|
||||
msgid "Byte Array Objects"
|
||||
msgstr "Objets Tableau d'Octets"
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:13
|
||||
msgid ""
|
||||
"This subtype of :c:type:`PyObject` represents a Python bytearray object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:18
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python bytearray "
|
||||
"type; it is the same object as :class:`bytearray` in the Python layer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:23
|
||||
msgid "Type check macros"
|
||||
msgstr "Macros de vérification de type"
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:27
|
||||
msgid ""
|
||||
"Return true if the object *o* is a bytearray object or an instance of a "
|
||||
"subtype of the bytearray type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:33
|
||||
msgid ""
|
||||
"Return true if the object *o* is a bytearray object, but not an instance of "
|
||||
"a subtype of the bytearray type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:38
|
||||
msgid "Direct API functions"
|
||||
msgstr "Fonctions directes sur l'API"
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:42
|
||||
msgid ""
|
||||
"Return a new bytearray object from any object, *o*, that implements the :ref:"
|
||||
"`buffer protocol <bufferobjects>`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:50
|
||||
msgid ""
|
||||
"Create a new bytearray object from *string* and its length, *len*. On "
|
||||
"failure, *NULL* is returned."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:56
|
||||
msgid ""
|
||||
"Concat bytearrays *a* and *b* and return a new bytearray with the result."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:61
|
||||
msgid "Return the size of *bytearray* after checking for a *NULL* pointer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:66
|
||||
msgid ""
|
||||
"Return the contents of *bytearray* as a char array after checking for a "
|
||||
"*NULL* pointer. The returned array always has an extra null byte appended."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:73
|
||||
msgid "Resize the internal buffer of *bytearray* to *len*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:76
|
||||
msgid "Macros"
|
||||
msgstr "Macros"
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:78
|
||||
msgid "These macros trade safety for speed and they don't check pointers."
|
||||
msgstr ""
|
||||
"Ces macros sont taillées pour la vitesse d'exécution et ne vérifient pas les "
|
||||
"pointeurs."
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:82
|
||||
msgid "Macro version of :c:func:`PyByteArray_AsString`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytearray.rst:87
|
||||
msgid "Macro version of :c:func:`PyByteArray_Size`."
|
||||
msgstr ""
|
|
@ -0,0 +1,320 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:6
|
||||
msgid "Bytes Objects"
|
||||
msgstr "Objets bytes"
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:8
|
||||
msgid ""
|
||||
"These functions raise :exc:`TypeError` when expecting a bytes parameter and "
|
||||
"are called with a non-bytes parameter."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:16
|
||||
msgid "This subtype of :c:type:`PyObject` represents a Python bytes object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:21
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python bytes type; it "
|
||||
"is the same object as :class:`bytes` in the Python layer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:27
|
||||
msgid ""
|
||||
"Return true if the object *o* is a bytes object or an instance of a subtype "
|
||||
"of the bytes type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:33
|
||||
msgid ""
|
||||
"Return true if the object *o* is a bytes object, but not an instance of a "
|
||||
"subtype of the bytes type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:39
|
||||
msgid ""
|
||||
"Return a new bytes object with a copy of the string *v* as value on success, "
|
||||
"and *NULL* on failure. The parameter *v* must not be *NULL*; it will not be "
|
||||
"checked."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:46
|
||||
msgid ""
|
||||
"Return a new bytes object with a copy of the string *v* as value and length "
|
||||
"*len* on success, and *NULL* on failure. If *v* is *NULL*, the contents of "
|
||||
"the bytes object are uninitialized."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:53
|
||||
msgid ""
|
||||
"Take a C :c:func:`printf`\\ -style *format* string and a variable number of "
|
||||
"arguments, calculate the size of the resulting Python bytes object and "
|
||||
"return a bytes object with the values formatted into it. The variable "
|
||||
"arguments must be C types and must correspond exactly to the format "
|
||||
"characters in the *format* string. The following format characters are "
|
||||
"allowed:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:68
|
||||
msgid "Format Characters"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:68
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:68
|
||||
msgid "Comment"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:70
|
||||
msgid ":attr:`%%`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:70
|
||||
msgid "*n/a*"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:70
|
||||
msgid "The literal % character."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:72
|
||||
msgid ":attr:`%c`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:72 ../Doc/c-api/bytes.rst:75
|
||||
#: ../Doc/c-api/bytes.rst:93 ../Doc/c-api/bytes.rst:96
|
||||
msgid "int"
|
||||
msgstr "int"
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:72
|
||||
msgid "A single byte, represented as a C int."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:75
|
||||
msgid ":attr:`%d`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:75
|
||||
msgid "Exactly equivalent to ``printf(\"%d\")``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:78
|
||||
msgid ":attr:`%u`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:78
|
||||
msgid "unsigned int"
|
||||
msgstr "unsigned int"
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:78
|
||||
msgid "Exactly equivalent to ``printf(\"%u\")``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:81
|
||||
msgid ":attr:`%ld`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:81
|
||||
msgid "long"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:81
|
||||
msgid "Exactly equivalent to ``printf(\"%ld\")``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:84
|
||||
msgid ":attr:`%lu`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:84
|
||||
msgid "unsigned long"
|
||||
msgstr "unsigned long"
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:84
|
||||
msgid "Exactly equivalent to ``printf(\"%lu\")``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:87
|
||||
msgid ":attr:`%zd`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:87
|
||||
msgid "Py_ssize_t"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:87
|
||||
msgid "Exactly equivalent to ``printf(\"%zd\")``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:90
|
||||
msgid ":attr:`%zu`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:90
|
||||
msgid "size_t"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:90
|
||||
msgid "Exactly equivalent to ``printf(\"%zu\")``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:93
|
||||
msgid ":attr:`%i`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:93
|
||||
msgid "Exactly equivalent to ``printf(\"%i\")``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:96
|
||||
msgid ":attr:`%x`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:96
|
||||
msgid "Exactly equivalent to ``printf(\"%x\")``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:99
|
||||
msgid ":attr:`%s`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:99
|
||||
msgid "char\\*"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:99
|
||||
msgid "A null-terminated C character array."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:102
|
||||
msgid ":attr:`%p`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:102
|
||||
msgid "void\\*"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:102
|
||||
msgid ""
|
||||
"The hex representation of a C pointer. Mostly equivalent to ``printf(\"%p"
|
||||
"\")`` except that it is guaranteed to start with the literal ``0x`` "
|
||||
"regardless of what the platform's ``printf`` yields."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:111
|
||||
msgid ""
|
||||
"An unrecognized format character causes all the rest of the format string to "
|
||||
"be copied as-is to the result object, and any extra arguments discarded."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:117
|
||||
msgid ""
|
||||
"Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two "
|
||||
"arguments."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:123
|
||||
msgid ""
|
||||
"Return the bytes representation of object *o* that implements the buffer "
|
||||
"protocol."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:129
|
||||
msgid "Return the length of the bytes in bytes object *o*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:134
|
||||
msgid "Macro form of :c:func:`PyBytes_Size` but without error checking."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:139
|
||||
msgid ""
|
||||
"Return a pointer to the contents of *o*. The pointer refers to the internal "
|
||||
"buffer of *o*, which consists of ``len(o) + 1`` bytes. The last byte in the "
|
||||
"buffer is always null, regardless of whether there are any other null "
|
||||
"bytes. The data must not be modified in any way, unless the object was just "
|
||||
"created using ``PyBytes_FromStringAndSize(NULL, size)``. It must not be "
|
||||
"deallocated. If *o* is not a bytes object at all, :c:func:"
|
||||
"`PyBytes_AsString` returns *NULL* and raises :exc:`TypeError`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:151
|
||||
msgid "Macro form of :c:func:`PyBytes_AsString` but without error checking."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:156
|
||||
msgid ""
|
||||
"Return the null-terminated contents of the object *obj* through the output "
|
||||
"variables *buffer* and *length*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:159
|
||||
msgid ""
|
||||
"If *length* is *NULL*, the bytes object may not contain embedded null bytes; "
|
||||
"if it does, the function returns ``-1`` and a :exc:`ValueError` is raised."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:163
|
||||
msgid ""
|
||||
"The buffer refers to an internal buffer of *obj*, which includes an "
|
||||
"additional null byte at the end (not counted in *length*). The data must "
|
||||
"not be modified in any way, unless the object was just created using "
|
||||
"``PyBytes_FromStringAndSize(NULL, size)``. It must not be deallocated. If "
|
||||
"*obj* is not a bytes object at all, :c:func:`PyBytes_AsStringAndSize` "
|
||||
"returns ``-1`` and raises :exc:`TypeError`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:170
|
||||
msgid ""
|
||||
"Previously, :exc:`TypeError` was raised when embedded null bytes were "
|
||||
"encountered in the bytes object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:177
|
||||
msgid ""
|
||||
"Create a new bytes object in *\\*bytes* containing the contents of *newpart* "
|
||||
"appended to *bytes*; the caller will own the new reference. The reference "
|
||||
"to the old value of *bytes* will be stolen. If the new object cannot be "
|
||||
"created, the old reference to *bytes* will still be discarded and the value "
|
||||
"of *\\*bytes* will be set to *NULL*; the appropriate exception will be set."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:186
|
||||
msgid ""
|
||||
"Create a new bytes object in *\\*bytes* containing the contents of *newpart* "
|
||||
"appended to *bytes*. This version decrements the reference count of "
|
||||
"*newpart*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/bytes.rst:193
|
||||
msgid ""
|
||||
"A way to resize a bytes object even though it is \"immutable\". Only use "
|
||||
"this to build up a brand new bytes object; don't use this if the bytes may "
|
||||
"already be known in other parts of the code. It is an error to call this "
|
||||
"function if the refcount on the input bytes object is not one. Pass the "
|
||||
"address of an existing bytes object as an lvalue (it may be written into), "
|
||||
"and the new size desired. On success, *\\*bytes* holds the resized bytes "
|
||||
"object and ``0`` is returned; the address in *\\*bytes* may differ from its "
|
||||
"input value. If the reallocation fails, the original bytes object at *"
|
||||
"\\*bytes* is deallocated, *\\*bytes* is set to *NULL*, :exc:`MemoryError` is "
|
||||
"set, and ``-1`` is returned."
|
||||
msgstr ""
|
|
@ -0,0 +1,200 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:6
|
||||
msgid "Capsules"
|
||||
msgstr "Capsules"
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:10
|
||||
msgid ""
|
||||
"Refer to :ref:`using-capsules` for more information on using these objects."
|
||||
msgstr ""
|
||||
"Reportez-vous à :ref:`using-capsules` pour plus d'informations sur "
|
||||
"l'utilisation de ces objets."
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:15
|
||||
msgid ""
|
||||
"This subtype of :c:type:`PyObject` represents an opaque value, useful for C "
|
||||
"extension modules who need to pass an opaque value (as a :c:type:`void\\*` "
|
||||
"pointer) through Python code to other C code. It is often used to make a C "
|
||||
"function pointer defined in one module available to other modules, so the "
|
||||
"regular import mechanism can be used to access C APIs defined in dynamically "
|
||||
"loaded modules."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:24
|
||||
msgid "The type of a destructor callback for a capsule. Defined as::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:28
|
||||
msgid ""
|
||||
"See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor "
|
||||
"callbacks."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:34
|
||||
msgid "Return true if its argument is a :c:type:`PyCapsule`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:39
|
||||
msgid ""
|
||||
"Create a :c:type:`PyCapsule` encapsulating the *pointer*. The *pointer* "
|
||||
"argument may not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:42
|
||||
msgid "On failure, set an exception and return *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:44
|
||||
msgid ""
|
||||
"The *name* string may either be *NULL* or a pointer to a valid C string. If "
|
||||
"non-*NULL*, this string must outlive the capsule. (Though it is permitted "
|
||||
"to free it inside the *destructor*.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:48
|
||||
msgid ""
|
||||
"If the *destructor* argument is not *NULL*, it will be called with the "
|
||||
"capsule as its argument when it is destroyed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:51
|
||||
msgid ""
|
||||
"If this capsule will be stored as an attribute of a module, the *name* "
|
||||
"should be specified as ``modulename.attributename``. This will enable other "
|
||||
"modules to import the capsule using :c:func:`PyCapsule_Import`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:58
|
||||
msgid ""
|
||||
"Retrieve the *pointer* stored in the capsule. On failure, set an exception "
|
||||
"and return *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:61
|
||||
msgid ""
|
||||
"The *name* parameter must compare exactly to the name stored in the capsule. "
|
||||
"If the name stored in the capsule is *NULL*, the *name* passed in must also "
|
||||
"be *NULL*. Python uses the C function :c:func:`strcmp` to compare capsule "
|
||||
"names."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:69
|
||||
msgid ""
|
||||
"Return the current destructor stored in the capsule. On failure, set an "
|
||||
"exception and return *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:72
|
||||
msgid ""
|
||||
"It is legal for a capsule to have a *NULL* destructor. This makes a *NULL* "
|
||||
"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:"
|
||||
"`PyErr_Occurred` to disambiguate."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:79
|
||||
msgid ""
|
||||
"Return the current context stored in the capsule. On failure, set an "
|
||||
"exception and return *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:82
|
||||
msgid ""
|
||||
"It is legal for a capsule to have a *NULL* context. This makes a *NULL* "
|
||||
"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:"
|
||||
"`PyErr_Occurred` to disambiguate."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:89
|
||||
msgid ""
|
||||
"Return the current name stored in the capsule. On failure, set an exception "
|
||||
"and return *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:92
|
||||
msgid ""
|
||||
"It is legal for a capsule to have a *NULL* name. This makes a *NULL* return "
|
||||
"code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:"
|
||||
"`PyErr_Occurred` to disambiguate."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:99
|
||||
msgid ""
|
||||
"Import a pointer to a C object from a capsule attribute in a module. The "
|
||||
"*name* parameter should specify the full name to the attribute, as in "
|
||||
"``module.attribute``. The *name* stored in the capsule must match this "
|
||||
"string exactly. If *no_block* is true, import the module without blocking "
|
||||
"(using :c:func:`PyImport_ImportModuleNoBlock`). If *no_block* is false, "
|
||||
"import the module conventionally (using :c:func:`PyImport_ImportModule`)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:106
|
||||
msgid ""
|
||||
"Return the capsule's internal *pointer* on success. On failure, set an "
|
||||
"exception and return *NULL*. However, if :c:func:`PyCapsule_Import` failed "
|
||||
"to import the module, and *no_block* was true, no exception is set."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:112
|
||||
msgid ""
|
||||
"Determines whether or not *capsule* is a valid capsule. A valid capsule is "
|
||||
"non-*NULL*, passes :c:func:`PyCapsule_CheckExact`, has a non-*NULL* pointer "
|
||||
"stored in it, and its internal name matches the *name* parameter. (See :c:"
|
||||
"func:`PyCapsule_GetPointer` for information on how capsule names are "
|
||||
"compared.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:118
|
||||
msgid ""
|
||||
"In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls "
|
||||
"to any of the accessors (any function starting with :c:func:`PyCapsule_Get`) "
|
||||
"are guaranteed to succeed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:122
|
||||
msgid ""
|
||||
"Return a nonzero value if the object is valid and matches the name passed "
|
||||
"in. Return 0 otherwise. This function will not fail."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:127
|
||||
msgid "Set the context pointer inside *capsule* to *context*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:129 ../Doc/c-api/capsule.rst:135
|
||||
#: ../Doc/c-api/capsule.rst:143 ../Doc/c-api/capsule.rst:150
|
||||
msgid "Return 0 on success. Return nonzero and set an exception on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:133
|
||||
msgid "Set the destructor inside *capsule* to *destructor*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:139
|
||||
msgid ""
|
||||
"Set the name inside *capsule* to *name*. If non-*NULL*, the name must "
|
||||
"outlive the capsule. If the previous *name* stored in the capsule was not "
|
||||
"*NULL*, no attempt is made to free it."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/capsule.rst:147
|
||||
msgid ""
|
||||
"Set the void pointer inside *capsule* to *pointer*. The pointer may not be "
|
||||
"*NULL*."
|
||||
msgstr ""
|
|
@ -0,0 +1,86 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/cell.rst:6
|
||||
msgid "Cell Objects"
|
||||
msgstr "Objets Cellules"
|
||||
|
||||
#: ../Doc/c-api/cell.rst:8
|
||||
msgid ""
|
||||
"\"Cell\" objects are used to implement variables referenced by multiple "
|
||||
"scopes. For each such variable, a cell object is created to store the value; "
|
||||
"the local variables of each stack frame that references the value contains a "
|
||||
"reference to the cells from outer scopes which also use that variable. When "
|
||||
"the value is accessed, the value contained in the cell is used instead of "
|
||||
"the cell object itself. This de-referencing of the cell object requires "
|
||||
"support from the generated byte-code; these are not automatically de-"
|
||||
"referenced when accessed. Cell objects are not likely to be useful elsewhere."
|
||||
msgstr ""
|
||||
"Les objets \"Cellules\" sont utilisés pour implémenter des variables "
|
||||
"référencées dans de multiples enviromments. Pour chacune de ces variables, "
|
||||
"un objet cellule est créé pour stocker sa valeur ; les variables locales de "
|
||||
"chaque pile d'exécution qui référence cette valeur contiennent une référence "
|
||||
"sur les cellules des autres environnements qui utilisent aussi cette "
|
||||
"variable. Quand la valeur est accédée, la valeur de la cellule est utilisée, "
|
||||
"au lei de celle de l'objet cellule proprement dit. Ce dé-référencement de "
|
||||
"l'objet cellule requiert l'intervention du bytecode généré ; il n'est pas "
|
||||
"automatiquement dé-référencé quand il est accédé. Il est plausible que les "
|
||||
"objets cellules ne soit utilisés ailleurs."
|
||||
|
||||
#: ../Doc/c-api/cell.rst:20
|
||||
msgid "The C structure used for cell objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/cell.rst:25
|
||||
msgid "The type object corresponding to cell objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/cell.rst:30
|
||||
msgid "Return true if *ob* is a cell object; *ob* must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/cell.rst:35
|
||||
msgid ""
|
||||
"Create and return a new cell object containing the value *ob*. The parameter "
|
||||
"may be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/cell.rst:41
|
||||
msgid "Return the contents of the cell *cell*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/cell.rst:46
|
||||
msgid ""
|
||||
"Return the contents of the cell *cell*, but without checking that *cell* is "
|
||||
"non-*NULL* and a cell object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/cell.rst:52
|
||||
msgid ""
|
||||
"Set the contents of the cell object *cell* to *value*. This releases the "
|
||||
"reference to any current content of the cell. *value* may be *NULL*. *cell* "
|
||||
"must be non-*NULL*; if it is not a cell object, ``-1`` will be returned. On "
|
||||
"success, ``0`` will be returned."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/cell.rst:60
|
||||
msgid ""
|
||||
"Sets the value of the cell object *cell* to *value*. No reference counts "
|
||||
"are adjusted, and no checks are made for safety; *cell* must be non-*NULL* "
|
||||
"and must be a cell object."
|
||||
msgstr ""
|
|
@ -0,0 +1,66 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/code.rst:8
|
||||
msgid "Code Objects"
|
||||
msgstr "Objets Code"
|
||||
|
||||
#: ../Doc/c-api/code.rst:12
|
||||
msgid ""
|
||||
"Code objects are a low-level detail of the CPython implementation. Each one "
|
||||
"represents a chunk of executable code that hasn't yet been bound into a "
|
||||
"function."
|
||||
msgstr ""
|
||||
"Les objets Code sont un détail bas-niveau de l'implémentation CPython. "
|
||||
"Chacun d'eux représente une partie de code exécutable, qui n'a pas encore "
|
||||
"été lié dans une fonction."
|
||||
|
||||
#: ../Doc/c-api/code.rst:18
|
||||
msgid ""
|
||||
"The C structure of the objects used to describe code objects. The fields of "
|
||||
"this type are subject to change at any time."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/code.rst:24
|
||||
msgid ""
|
||||
"This is an instance of :c:type:`PyTypeObject` representing the Python :class:"
|
||||
"`code` type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/code.rst:30
|
||||
msgid "Return true if *co* is a :class:`code` object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/code.rst:34
|
||||
msgid "Return the number of free variables in *co*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/code.rst:38
|
||||
msgid ""
|
||||
"Return a new code object. If you need a dummy code object to create a "
|
||||
"frame, use :c:func:`PyCode_NewEmpty` instead. Calling :c:func:`PyCode_New` "
|
||||
"directly can bind you to a precise Python version since the definition of "
|
||||
"the bytecode changes often."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/code.rst:46
|
||||
msgid ""
|
||||
"Return a new empty code object with the specified filename, function name, "
|
||||
"and first line number. It is illegal to :func:`exec` or :func:`eval` the "
|
||||
"resulting code object."
|
||||
msgstr ""
|
|
@ -0,0 +1,165 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/codec.rst:4
|
||||
msgid "Codec registry and support functions"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:8
|
||||
msgid "Register a new codec search function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:10
|
||||
msgid ""
|
||||
"As side effect, this tries to load the :mod:`encodings` package, if not yet "
|
||||
"done, to make sure that it is always first in the list of search functions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:15
|
||||
msgid ""
|
||||
"Return ``1`` or ``0`` depending on whether there is a registered codec for "
|
||||
"the given *encoding*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:20
|
||||
msgid "Generic codec based encoding API."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:22
|
||||
msgid ""
|
||||
"*object* is passed through the encoder function found for the given "
|
||||
"*encoding* using the error handling method defined by *errors*. *errors* "
|
||||
"may be *NULL* to use the default method defined for the codec. Raises a :"
|
||||
"exc:`LookupError` if no encoder can be found."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:29
|
||||
msgid "Generic codec based decoding API."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:31
|
||||
msgid ""
|
||||
"*object* is passed through the decoder function found for the given "
|
||||
"*encoding* using the error handling method defined by *errors*. *errors* "
|
||||
"may be *NULL* to use the default method defined for the codec. Raises a :"
|
||||
"exc:`LookupError` if no encoder can be found."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:38
|
||||
msgid "Codec lookup API"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:40
|
||||
msgid ""
|
||||
"In the following functions, the *encoding* string is looked up converted to "
|
||||
"all lower-case characters, which makes encodings looked up through this "
|
||||
"mechanism effectively case-insensitive. If no codec is found, a :exc:"
|
||||
"`KeyError` is set and *NULL* returned."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:47
|
||||
msgid "Get an encoder function for the given *encoding*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:51
|
||||
msgid "Get a decoder function for the given *encoding*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:55
|
||||
msgid ""
|
||||
"Get an :class:`~codecs.IncrementalEncoder` object for the given *encoding*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:59
|
||||
msgid ""
|
||||
"Get an :class:`~codecs.IncrementalDecoder` object for the given *encoding*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:63
|
||||
msgid ""
|
||||
"Get a :class:`~codecs.StreamReader` factory function for the given "
|
||||
"*encoding*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:67
|
||||
msgid ""
|
||||
"Get a :class:`~codecs.StreamWriter` factory function for the given "
|
||||
"*encoding*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:71
|
||||
msgid "Registry API for Unicode encoding error handlers"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:75
|
||||
msgid ""
|
||||
"Register the error handling callback function *error* under the given "
|
||||
"*name*. This callback function will be called by a codec when it encounters "
|
||||
"unencodable characters/undecodable bytes and *name* is specified as the "
|
||||
"error parameter in the call to the encode/decode function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:80
|
||||
msgid ""
|
||||
"The callback gets a single argument, an instance of :exc:"
|
||||
"`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or :exc:"
|
||||
"`UnicodeTranslateError` that holds information about the problematic "
|
||||
"sequence of characters or bytes and their offset in the original string "
|
||||
"(see :ref:`unicodeexceptions` for functions to extract this information). "
|
||||
"The callback must either raise the given exception, or return a two-item "
|
||||
"tuple containing the replacement for the problematic sequence, and an "
|
||||
"integer giving the offset in the original string at which encoding/decoding "
|
||||
"should be resumed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:90
|
||||
msgid "Return ``0`` on success, ``-1`` on error."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:94
|
||||
msgid ""
|
||||
"Lookup the error handling callback function registered under *name*. As a "
|
||||
"special case *NULL* can be passed, in which case the error handling callback "
|
||||
"for \"strict\" will be returned."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:100
|
||||
msgid "Raise *exc* as an exception."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:104
|
||||
msgid "Ignore the unicode error, skipping the faulty input."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:108
|
||||
msgid "Replace the unicode encode error with ``?`` or ``U+FFFD``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:112
|
||||
msgid "Replace the unicode encode error with XML character references."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:116
|
||||
msgid ""
|
||||
"Replace the unicode encode error with backslash escapes (``\\x``, ``\\u`` "
|
||||
"and ``\\U``)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/codec.rst:121
|
||||
msgid "Replace the unicode encode error with ``\\N{...}`` escapes."
|
||||
msgstr ""
|
|
@ -0,0 +1,160 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/complex.rst:6
|
||||
msgid "Complex Number Objects"
|
||||
msgstr "Objets Nombres Complexes"
|
||||
|
||||
#: ../Doc/c-api/complex.rst:10
|
||||
msgid ""
|
||||
"Python's complex number objects are implemented as two distinct types when "
|
||||
"viewed from the C API: one is the Python object exposed to Python programs, "
|
||||
"and the other is a C structure which represents the actual complex number "
|
||||
"value. The API provides functions for working with both."
|
||||
msgstr ""
|
||||
"Les objets Python nombres complexes sont implémentés comme deux types "
|
||||
"distincts, lorsqu'ils sont vus de l'API C : l'un est l'objet Python tel "
|
||||
"qu'il est vu par les programmes Python, et l'autre est une structure C qui "
|
||||
"représente la valeur complexe courante. L'API fournit des fonctions pour "
|
||||
"travailler avec ces deux représentations."
|
||||
|
||||
#: ../Doc/c-api/complex.rst:17
|
||||
msgid "Complex Numbers as C Structures"
|
||||
msgstr "Nombres complexes en tant que structures C"
|
||||
|
||||
#: ../Doc/c-api/complex.rst:19
|
||||
msgid ""
|
||||
"Note that the functions which accept these structures as parameters and "
|
||||
"return them as results do so *by value* rather than dereferencing them "
|
||||
"through pointers. This is consistent throughout the API."
|
||||
msgstr ""
|
||||
"Remarquez que les fonctions qui acceptent ces structures comme paramètres et "
|
||||
"les retournent comme résultats le font *par valeur* au lieur de les dé-"
|
||||
"référencer en utilisant des pointeurs. Cela est constant dans toute l'API."
|
||||
|
||||
#: ../Doc/c-api/complex.rst:26
|
||||
msgid ""
|
||||
"The C structure which corresponds to the value portion of a Python complex "
|
||||
"number object. Most of the functions for dealing with complex number "
|
||||
"objects use structures of this type as input or output values, as "
|
||||
"appropriate. It is defined as::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:39
|
||||
msgid ""
|
||||
"Return the sum of two complex numbers, using the C :c:type:`Py_complex` "
|
||||
"representation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:45
|
||||
msgid ""
|
||||
"Return the difference between two complex numbers, using the C :c:type:"
|
||||
"`Py_complex` representation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:51
|
||||
msgid ""
|
||||
"Return the negation of the complex number *complex*, using the C :c:type:"
|
||||
"`Py_complex` representation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:57
|
||||
msgid ""
|
||||
"Return the product of two complex numbers, using the C :c:type:`Py_complex` "
|
||||
"representation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:63
|
||||
msgid ""
|
||||
"Return the quotient of two complex numbers, using the C :c:type:`Py_complex` "
|
||||
"representation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:66
|
||||
msgid ""
|
||||
"If *divisor* is null, this method returns zero and sets :c:data:`errno` to :"
|
||||
"c:data:`EDOM`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:72
|
||||
msgid ""
|
||||
"Return the exponentiation of *num* by *exp*, using the C :c:type:"
|
||||
"`Py_complex` representation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:75
|
||||
msgid ""
|
||||
"If *num* is null and *exp* is not a positive real number, this method "
|
||||
"returns zero and sets :c:data:`errno` to :c:data:`EDOM`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:80
|
||||
msgid "Complex Numbers as Python Objects"
|
||||
msgstr "Nombres complexes en tant qu'objets Python"
|
||||
|
||||
#: ../Doc/c-api/complex.rst:85
|
||||
msgid ""
|
||||
"This subtype of :c:type:`PyObject` represents a Python complex number object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:90
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python complex number "
|
||||
"type. It is the same object as :class:`complex` in the Python layer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:96
|
||||
msgid ""
|
||||
"Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :"
|
||||
"c:type:`PyComplexObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:102
|
||||
msgid ""
|
||||
"Return true if its argument is a :c:type:`PyComplexObject`, but not a "
|
||||
"subtype of :c:type:`PyComplexObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:108
|
||||
msgid ""
|
||||
"Create a new Python complex number object from a C :c:type:`Py_complex` "
|
||||
"value."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:113
|
||||
msgid "Return a new :c:type:`PyComplexObject` object from *real* and *imag*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:118
|
||||
msgid "Return the real part of *op* as a C :c:type:`double`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:123
|
||||
msgid "Return the imaginary part of *op* as a C :c:type:`double`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:128
|
||||
msgid "Return the :c:type:`Py_complex` value of the complex number *op*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/complex.rst:130
|
||||
msgid ""
|
||||
"If *op* is not a Python complex number object but has a :meth:`__complex__` "
|
||||
"method, this method will first be called to convert *op* to a Python complex "
|
||||
"number object. Upon failure, this method returns ``-1.0`` as a real value."
|
||||
msgstr ""
|
|
@ -0,0 +1,84 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/concrete.rst:8
|
||||
msgid "Concrete Objects Layer"
|
||||
msgstr "Couche des Objets Concrets"
|
||||
|
||||
#: ../Doc/c-api/concrete.rst:10
|
||||
msgid ""
|
||||
"The functions in this chapter are specific to certain Python object types. "
|
||||
"Passing them an object of the wrong type is not a good idea; if you receive "
|
||||
"an object from a Python program and you are not sure that it has the right "
|
||||
"type, you must perform a type check first; for example, to check that an "
|
||||
"object is a dictionary, use :c:func:`PyDict_Check`. The chapter is "
|
||||
"structured like the \"family tree\" of Python object types."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/concrete.rst:19
|
||||
msgid ""
|
||||
"While the functions described in this chapter carefully check the type of "
|
||||
"the objects which are passed in, many of them do not check for *NULL* being "
|
||||
"passed instead of a valid object. Allowing *NULL* to be passed in can cause "
|
||||
"memory access violations and immediate termination of the interpreter."
|
||||
msgstr ""
|
||||
"Tandis que les fonctions décrites dans ce chapitre vérifient avec soin le "
|
||||
"type des objets qui leur sont passés, beaucoup d'entre elles ne vérifient "
|
||||
"pas que *NULL* est passé au lieu d'un objet valide. Autoriser *NULL* à être "
|
||||
"passé peut provoquer des violations d'accès à la mémoire et ainsi terminer "
|
||||
"immédiatement l'interpréteur."
|
||||
|
||||
#: ../Doc/c-api/concrete.rst:28
|
||||
msgid "Fundamental Objects"
|
||||
msgstr "Objets fondamentaux"
|
||||
|
||||
#: ../Doc/c-api/concrete.rst:30
|
||||
msgid ""
|
||||
"This section describes Python type objects and the singleton object ``None``."
|
||||
msgstr ""
|
||||
"Cette section décrit les objets de type Python et l'objet singleton ``None``."
|
||||
|
||||
#: ../Doc/c-api/concrete.rst:41
|
||||
msgid "Numeric Objects"
|
||||
msgstr "Objets numériques"
|
||||
|
||||
#: ../Doc/c-api/concrete.rst:56
|
||||
msgid "Sequence Objects"
|
||||
msgstr "Objets séquences"
|
||||
|
||||
#: ../Doc/c-api/concrete.rst:60
|
||||
msgid ""
|
||||
"Generic operations on sequence objects were discussed in the previous "
|
||||
"chapter; this section deals with the specific kinds of sequence objects that "
|
||||
"are intrinsic to the Python language."
|
||||
msgstr ""
|
||||
"Les opérations génériques sur les objets séquences ont été discutées dans le "
|
||||
"chapitre précédent. Cette section traite des genres spécifiques d'objets "
|
||||
"séquences qui sont intrinsèques au langage Python."
|
||||
|
||||
#: ../Doc/c-api/concrete.rst:78
|
||||
msgid "Container Objects"
|
||||
msgstr "Objets Conteneurs"
|
||||
|
||||
#: ../Doc/c-api/concrete.rst:91
|
||||
msgid "Function Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/concrete.rst:102
|
||||
msgid "Other Objects"
|
||||
msgstr "Autres Objets"
|
|
@ -0,0 +1,201 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:6
|
||||
msgid "String conversion and formatting"
|
||||
msgstr "Conversion et formatage de chaînes"
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:8
|
||||
msgid "Functions for number conversion and formatted string output."
|
||||
msgstr ""
|
||||
"Fonctions de conversion pour les nombres et pour la sortie des chaînes "
|
||||
"formattées."
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:13
|
||||
msgid ""
|
||||
"Output not more than *size* bytes to *str* according to the format string "
|
||||
"*format* and the extra arguments. See the Unix man page :manpage:"
|
||||
"`snprintf(2)`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:19
|
||||
msgid ""
|
||||
"Output not more than *size* bytes to *str* according to the format string "
|
||||
"*format* and the variable argument list *va*. Unix man page :manpage:"
|
||||
"`vsnprintf(2)`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:23
|
||||
msgid ""
|
||||
":c:func:`PyOS_snprintf` and :c:func:`PyOS_vsnprintf` wrap the Standard C "
|
||||
"library functions :c:func:`snprintf` and :c:func:`vsnprintf`. Their purpose "
|
||||
"is to guarantee consistent behavior in corner cases, which the Standard C "
|
||||
"functions do not."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:28
|
||||
msgid ""
|
||||
"The wrappers ensure that *str*[*size*-1] is always ``'\\0'`` upon return. "
|
||||
"They never write more than *size* bytes (including the trailing ``'\\0'``) "
|
||||
"into str. Both functions require that ``str != NULL``, ``size > 0`` and "
|
||||
"``format != NULL``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:33
|
||||
msgid ""
|
||||
"If the platform doesn't have :c:func:`vsnprintf` and the buffer size needed "
|
||||
"to avoid truncation exceeds *size* by more than 512 bytes, Python aborts "
|
||||
"with a *Py_FatalError*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:37
|
||||
msgid ""
|
||||
"The return value (*rv*) for these functions should be interpreted as follows:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:39
|
||||
msgid ""
|
||||
"When ``0 <= rv < size``, the output conversion was successful and *rv* "
|
||||
"characters were written to *str* (excluding the trailing ``'\\0'`` byte at "
|
||||
"*str*[*rv*])."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:43
|
||||
msgid ""
|
||||
"When ``rv >= size``, the output conversion was truncated and a buffer with "
|
||||
"``rv + 1`` bytes would have been needed to succeed. *str*[*size*-1] is "
|
||||
"``'\\0'`` in this case."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:47
|
||||
msgid ""
|
||||
"When ``rv < 0``, \"something bad happened.\" *str*[*size*-1] is ``'\\0'`` in "
|
||||
"this case too, but the rest of *str* is undefined. The exact cause of the "
|
||||
"error depends on the underlying platform."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:51
|
||||
msgid ""
|
||||
"The following functions provide locale-independent string to number "
|
||||
"conversions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:56
|
||||
msgid ""
|
||||
"Convert a string ``s`` to a :c:type:`double`, raising a Python exception on "
|
||||
"failure. The set of accepted strings corresponds to the set of strings "
|
||||
"accepted by Python's :func:`float` constructor, except that ``s`` must not "
|
||||
"have leading or trailing whitespace. The conversion is independent of the "
|
||||
"current locale."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:62
|
||||
msgid ""
|
||||
"If ``endptr`` is ``NULL``, convert the whole string. Raise ValueError and "
|
||||
"return ``-1.0`` if the string is not a valid representation of a floating-"
|
||||
"point number."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:66
|
||||
msgid ""
|
||||
"If endptr is not ``NULL``, convert as much of the string as possible and set "
|
||||
"``*endptr`` to point to the first unconverted character. If no initial "
|
||||
"segment of the string is the valid representation of a floating-point "
|
||||
"number, set ``*endptr`` to point to the beginning of the string, raise "
|
||||
"ValueError, and return ``-1.0``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:73
|
||||
msgid ""
|
||||
"If ``s`` represents a value that is too large to store in a float (for "
|
||||
"example, ``\"1e500\"`` is such a string on many platforms) then if "
|
||||
"``overflow_exception`` is ``NULL`` return ``Py_HUGE_VAL`` (with an "
|
||||
"appropriate sign) and don't set any exception. Otherwise, "
|
||||
"``overflow_exception`` must point to a Python exception object; raise that "
|
||||
"exception and return ``-1.0``. In both cases, set ``*endptr`` to point to "
|
||||
"the first character after the converted value."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:81
|
||||
msgid ""
|
||||
"If any other error occurs during the conversion (for example an out-of-"
|
||||
"memory error), set the appropriate Python exception and return ``-1.0``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:90
|
||||
msgid ""
|
||||
"Convert a :c:type:`double` *val* to a string using supplied *format_code*, "
|
||||
"*precision*, and *flags*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:93
|
||||
msgid ""
|
||||
"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, "
|
||||
"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is "
|
||||
"ignored. The ``'r'`` format code specifies the standard :func:`repr` format."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:98
|
||||
msgid ""
|
||||
"*flags* can be zero or more of the values *Py_DTSF_SIGN*, "
|
||||
"*Py_DTSF_ADD_DOT_0*, or *Py_DTSF_ALT*, or-ed together:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:101
|
||||
msgid ""
|
||||
"*Py_DTSF_SIGN* means to always precede the returned string with a sign "
|
||||
"character, even if *val* is non-negative."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:104
|
||||
msgid ""
|
||||
"*Py_DTSF_ADD_DOT_0* means to ensure that the returned string will not look "
|
||||
"like an integer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:107
|
||||
msgid ""
|
||||
"*Py_DTSF_ALT* means to apply \"alternate\" formatting rules. See the "
|
||||
"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:111
|
||||
msgid ""
|
||||
"If *ptype* is non-NULL, then the value it points to will be set to one of "
|
||||
"*Py_DTST_FINITE*, *Py_DTST_INFINITE*, or *Py_DTST_NAN*, signifying that "
|
||||
"*val* is a finite number, an infinite number, or not a number, respectively."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:115
|
||||
msgid ""
|
||||
"The return value is a pointer to *buffer* with the converted string or "
|
||||
"*NULL* if the conversion failed. The caller is responsible for freeing the "
|
||||
"returned string by calling :c:func:`PyMem_Free`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:124
|
||||
msgid ""
|
||||
"Case insensitive comparison of strings. The function works almost "
|
||||
"identically to :c:func:`strcmp` except that it ignores the case."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/conversion.rst:130
|
||||
msgid ""
|
||||
"Case insensitive comparison of strings. The function works almost "
|
||||
"identically to :c:func:`strncmp` except that it ignores the case."
|
||||
msgstr ""
|
|
@ -0,0 +1,47 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/coro.rst:6
|
||||
msgid "Coroutine Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/coro.rst:10
|
||||
msgid ""
|
||||
"Coroutine objects are what functions declared with an ``async`` keyword "
|
||||
"return."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/coro.rst:16
|
||||
msgid "The C structure used for coroutine objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/coro.rst:21
|
||||
msgid "The type object corresponding to coroutine objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/coro.rst:26
|
||||
msgid "Return true if *ob*'s type is *PyCoro_Type*; *ob* must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/coro.rst:31
|
||||
msgid ""
|
||||
"Create and return a new coroutine object based on the *frame* object, with "
|
||||
"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference "
|
||||
"to *frame* is stolen by this function. The *frame* argument must not be "
|
||||
"*NULL*."
|
||||
msgstr ""
|
|
@ -0,0 +1,210 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:6
|
||||
msgid "DateTime Objects"
|
||||
msgstr "Objets DateTime"
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:8
|
||||
msgid ""
|
||||
"Various date and time objects are supplied by the :mod:`datetime` module. "
|
||||
"Before using any of these functions, the header file :file:`datetime.h` must "
|
||||
"be included in your source (note that this is not included by :file:`Python."
|
||||
"h`), and the macro :c:macro:`PyDateTime_IMPORT` must be invoked, usually as "
|
||||
"part of the module initialisation function. The macro puts a pointer to a C "
|
||||
"structure into a static variable, :c:data:`PyDateTimeAPI`, that is used by "
|
||||
"the following macros."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:16
|
||||
msgid "Type-check macros:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:20
|
||||
msgid ""
|
||||
"Return true if *ob* is of type :c:data:`PyDateTime_DateType` or a subtype "
|
||||
"of :c:data:`PyDateTime_DateType`. *ob* must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:26
|
||||
msgid ""
|
||||
"Return true if *ob* is of type :c:data:`PyDateTime_DateType`. *ob* must not "
|
||||
"be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:32
|
||||
msgid ""
|
||||
"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType` or a "
|
||||
"subtype of :c:data:`PyDateTime_DateTimeType`. *ob* must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:38
|
||||
msgid ""
|
||||
"Return true if *ob* is of type :c:data:`PyDateTime_DateTimeType`. *ob* must "
|
||||
"not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:44
|
||||
msgid ""
|
||||
"Return true if *ob* is of type :c:data:`PyDateTime_TimeType` or a subtype "
|
||||
"of :c:data:`PyDateTime_TimeType`. *ob* must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:50
|
||||
msgid ""
|
||||
"Return true if *ob* is of type :c:data:`PyDateTime_TimeType`. *ob* must not "
|
||||
"be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:56
|
||||
msgid ""
|
||||
"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType` or a subtype "
|
||||
"of :c:data:`PyDateTime_DeltaType`. *ob* must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:62
|
||||
msgid ""
|
||||
"Return true if *ob* is of type :c:data:`PyDateTime_DeltaType`. *ob* must not "
|
||||
"be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:68
|
||||
msgid ""
|
||||
"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType` or a subtype "
|
||||
"of :c:data:`PyDateTime_TZInfoType`. *ob* must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:74
|
||||
msgid ""
|
||||
"Return true if *ob* is of type :c:data:`PyDateTime_TZInfoType`. *ob* must "
|
||||
"not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:78
|
||||
msgid "Macros to create objects:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:82
|
||||
msgid ""
|
||||
"Return a ``datetime.date`` object with the specified year, month and day."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:87
|
||||
msgid ""
|
||||
"Return a ``datetime.datetime`` object with the specified year, month, day, "
|
||||
"hour, minute, second and microsecond."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:93
|
||||
msgid ""
|
||||
"Return a ``datetime.time`` object with the specified hour, minute, second "
|
||||
"and microsecond."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:99
|
||||
msgid ""
|
||||
"Return a ``datetime.timedelta`` object representing the given number of "
|
||||
"days, seconds and microseconds. Normalization is performed so that the "
|
||||
"resulting number of microseconds and seconds lie in the ranges documented "
|
||||
"for ``datetime.timedelta`` objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:105
|
||||
msgid ""
|
||||
"Macros to extract fields from date objects. The argument must be an "
|
||||
"instance of :c:data:`PyDateTime_Date`, including subclasses (such as :c:data:"
|
||||
"`PyDateTime_DateTime`). The argument must not be *NULL*, and the type is "
|
||||
"not checked:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:112
|
||||
msgid "Return the year, as a positive int."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:117
|
||||
msgid "Return the month, as an int from 1 through 12."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:122
|
||||
msgid "Return the day, as an int from 1 through 31."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:125
|
||||
msgid ""
|
||||
"Macros to extract fields from datetime objects. The argument must be an "
|
||||
"instance of :c:data:`PyDateTime_DateTime`, including subclasses. The "
|
||||
"argument must not be *NULL*, and the type is not checked:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:131 ../Doc/c-api/datetime.rst:155
|
||||
msgid "Return the hour, as an int from 0 through 23."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:136 ../Doc/c-api/datetime.rst:160
|
||||
msgid "Return the minute, as an int from 0 through 59."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:141 ../Doc/c-api/datetime.rst:165
|
||||
msgid "Return the second, as an int from 0 through 59."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:146 ../Doc/c-api/datetime.rst:170
|
||||
msgid "Return the microsecond, as an int from 0 through 999999."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:149
|
||||
msgid ""
|
||||
"Macros to extract fields from time objects. The argument must be an "
|
||||
"instance of :c:data:`PyDateTime_Time`, including subclasses. The argument "
|
||||
"must not be *NULL*, and the type is not checked:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:173
|
||||
msgid ""
|
||||
"Macros to extract fields from time delta objects. The argument must be an "
|
||||
"instance of :c:data:`PyDateTime_Delta`, including subclasses. The argument "
|
||||
"must not be *NULL*, and the type is not checked:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:179
|
||||
msgid "Return the number of days, as an int from -999999999 to 999999999."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:186
|
||||
msgid "Return the number of seconds, as an int from 0 through 86399."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:193
|
||||
msgid "Return the number of microseconds, as an int from 0 through 999999."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:198
|
||||
msgid "Macros for the convenience of modules implementing the DB API:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:202
|
||||
msgid ""
|
||||
"Create and return a new ``datetime.datetime`` object given an argument tuple "
|
||||
"suitable for passing to ``datetime.datetime.fromtimestamp()``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/datetime.rst:208
|
||||
msgid ""
|
||||
"Create and return a new ``datetime.date`` object given an argument tuple "
|
||||
"suitable for passing to ``datetime.date.fromtimestamp()``."
|
||||
msgstr ""
|
|
@ -0,0 +1,38 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/descriptor.rst:6
|
||||
msgid "Descriptor Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/descriptor.rst:8
|
||||
msgid ""
|
||||
"\"Descriptors\" are objects that describe some attribute of an object. They "
|
||||
"are found in the dictionary of type objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/descriptor.rst:15
|
||||
msgid "The type object for the built-in descriptor types."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/descriptor.rst:35
|
||||
msgid ""
|
||||
"Return true if the descriptor objects *descr* describes a data attribute, or "
|
||||
"false if it describes a method. *descr* must be a descriptor object; there "
|
||||
"is no error checking."
|
||||
msgstr ""
|
|
@ -0,0 +1,205 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/dict.rst:6
|
||||
msgid "Dictionary Objects"
|
||||
msgstr "Objets dictionnaires"
|
||||
|
||||
#: ../Doc/c-api/dict.rst:13
|
||||
msgid ""
|
||||
"This subtype of :c:type:`PyObject` represents a Python dictionary object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:18
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python dictionary "
|
||||
"type. This is the same object as :class:`dict` in the Python layer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:24
|
||||
msgid ""
|
||||
"Return true if *p* is a dict object or an instance of a subtype of the dict "
|
||||
"type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:30
|
||||
msgid ""
|
||||
"Return true if *p* is a dict object, but not an instance of a subtype of the "
|
||||
"dict type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:36
|
||||
msgid "Return a new empty dictionary, or *NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:41
|
||||
msgid ""
|
||||
"Return a :class:`types.MappingProxyType` object for a mapping which enforces "
|
||||
"read-only behavior. This is normally used to create a view to prevent "
|
||||
"modification of the dictionary for non-dynamic class types."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:48
|
||||
msgid "Empty an existing dictionary of all key-value pairs."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:53
|
||||
msgid ""
|
||||
"Determine if dictionary *p* contains *key*. If an item in *p* is matches "
|
||||
"*key*, return ``1``, otherwise return ``0``. On error, return ``-1``. This "
|
||||
"is equivalent to the Python expression ``key in p``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:60
|
||||
msgid "Return a new dictionary that contains the same key-value pairs as *p*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:65
|
||||
msgid ""
|
||||
"Insert *value* into the dictionary *p* with a key of *key*. *key* must be :"
|
||||
"term:`hashable`; if it isn't, :exc:`TypeError` will be raised. Return ``0`` "
|
||||
"on success or ``-1`` on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:74
|
||||
msgid ""
|
||||
"Insert *value* into the dictionary *p* using *key* as a key. *key* should be "
|
||||
"a :c:type:`char\\*`. The key object is created using "
|
||||
"``PyUnicode_FromString(key)``. Return ``0`` on success or ``-1`` on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:82
|
||||
msgid ""
|
||||
"Remove the entry in dictionary *p* with key *key*. *key* must be hashable; "
|
||||
"if it isn't, :exc:`TypeError` is raised. Return ``0`` on success or ``-1`` "
|
||||
"on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:89
|
||||
msgid ""
|
||||
"Remove the entry in dictionary *p* which has a key specified by the string "
|
||||
"*key*. Return ``0`` on success or ``-1`` on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:95
|
||||
msgid ""
|
||||
"Return the object from dictionary *p* which has a key *key*. Return *NULL* "
|
||||
"if the key *key* is not present, but *without* setting an exception."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:101
|
||||
msgid ""
|
||||
"Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. "
|
||||
"Return *NULL* **with** an exception set if an exception occurred. Return "
|
||||
"*NULL* **without** an exception set if the key wasn't present."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:109
|
||||
msgid ""
|
||||
"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a :c:"
|
||||
"type:`char\\*`, rather than a :c:type:`PyObject\\*`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:115
|
||||
msgid ""
|
||||
"This is the same as the Python-level :meth:`dict.setdefault`. If present, "
|
||||
"it returns the value corresponding to *key* from the dictionary *p*. If the "
|
||||
"key is not in the dict, it is inserted with value *defaultobj* and "
|
||||
"*defaultobj* is returned. This function evaluates the hash function of "
|
||||
"*key* only once, instead of evaluating it independently for the lookup and "
|
||||
"the insertion."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:125
|
||||
msgid ""
|
||||
"Return a :c:type:`PyListObject` containing all the items from the dictionary."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:130
|
||||
msgid ""
|
||||
"Return a :c:type:`PyListObject` containing all the keys from the dictionary."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:135
|
||||
msgid ""
|
||||
"Return a :c:type:`PyListObject` containing all the values from the "
|
||||
"dictionary *p*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:143
|
||||
msgid ""
|
||||
"Return the number of items in the dictionary. This is equivalent to "
|
||||
"``len(p)`` on a dictionary."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:149
|
||||
msgid ""
|
||||
"Iterate over all key-value pairs in the dictionary *p*. The :c:type:"
|
||||
"`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` prior to the "
|
||||
"first call to this function to start the iteration; the function returns "
|
||||
"true for each pair in the dictionary, and false once all pairs have been "
|
||||
"reported. The parameters *pkey* and *pvalue* should either point to :c:type:"
|
||||
"`PyObject\\*` variables that will be filled in with each key and value, "
|
||||
"respectively, or may be *NULL*. Any references returned through them are "
|
||||
"borrowed. *ppos* should not be altered during iteration. Its value "
|
||||
"represents offsets within the internal dictionary structure, and since the "
|
||||
"structure is sparse, the offsets are not consecutive."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:160
|
||||
msgid "For example::"
|
||||
msgstr "Par exemple : ::"
|
||||
|
||||
#: ../Doc/c-api/dict.rst:170
|
||||
msgid ""
|
||||
"The dictionary *p* should not be mutated during iteration. It is safe to "
|
||||
"modify the values of the keys as you iterate over the dictionary, but only "
|
||||
"so long as the set of keys does not change. For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:195
|
||||
msgid ""
|
||||
"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
|
||||
"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
|
||||
"and :c:func:`PyObject_GetItem`. If *override* is true, existing pairs in *a* "
|
||||
"will be replaced if a matching key is found in *b*, otherwise pairs will "
|
||||
"only be added if there is not a matching key in *a*. Return ``0`` on success "
|
||||
"or ``-1`` if an exception was raised."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:205
|
||||
msgid ""
|
||||
"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a."
|
||||
"update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back "
|
||||
"to the iterating over a sequence of key value pairs if the second argument "
|
||||
"has no \"keys\" attribute. Return ``0`` on success or ``-1`` if an "
|
||||
"exception was raised."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:214
|
||||
msgid ""
|
||||
"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
|
||||
"*seq2* must be an iterable object producing iterable objects of length 2, "
|
||||
"viewed as key-value pairs. In case of duplicate keys, the last wins if "
|
||||
"*override* is true, else the first wins. Return ``0`` on success or ``-1`` "
|
||||
"if an exception was raised. Equivalent Python (except for the return value)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/dict.rst:229
|
||||
msgid "Clear the free list. Return the total number of freed items."
|
||||
msgstr ""
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,90 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/file.rst:6
|
||||
msgid "File Objects"
|
||||
msgstr "Objets fichiers"
|
||||
|
||||
#: ../Doc/c-api/file.rst:10
|
||||
msgid ""
|
||||
"These APIs are a minimal emulation of the Python 2 C API for built-in file "
|
||||
"objects, which used to rely on the buffered I/O (:c:type:`FILE\\*`) support "
|
||||
"from the C standard library. In Python 3, files and streams use the new :"
|
||||
"mod:`io` module, which defines several layers over the low-level unbuffered "
|
||||
"I/O of the operating system. The functions described below are convenience "
|
||||
"C wrappers over these new APIs, and meant mostly for internal error "
|
||||
"reporting in the interpreter; third-party code is advised to access the :mod:"
|
||||
"`io` APIs instead."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/file.rst:22
|
||||
msgid ""
|
||||
"Create a Python file object from the file descriptor of an already opened "
|
||||
"file *fd*. The arguments *name*, *encoding*, *errors* and *newline* can be "
|
||||
"*NULL* to use the defaults; *buffering* can be *-1* to use the default. "
|
||||
"*name* is ignored and kept for backward compatibility. Return *NULL* on "
|
||||
"failure. For a more comprehensive description of the arguments, please refer "
|
||||
"to the :func:`io.open` function documentation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/file.rst:31
|
||||
msgid ""
|
||||
"Since Python streams have their own buffering layer, mixing them with OS-"
|
||||
"level file descriptors can produce various issues (such as unexpected "
|
||||
"ordering of data)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/file.rst:35
|
||||
msgid "Ignore *name* attribute."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/file.rst:41
|
||||
msgid ""
|
||||
"Return the file descriptor associated with *p* as an :c:type:`int`. If the "
|
||||
"object is an integer, its value is returned. If not, the object's :meth:"
|
||||
"`~io.IOBase.fileno` method is called if it exists; the method must return an "
|
||||
"integer, which is returned as the file descriptor value. Sets an exception "
|
||||
"and returns ``-1`` on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/file.rst:52
|
||||
msgid ""
|
||||
"Equivalent to ``p.readline([n])``, this function reads one line from the "
|
||||
"object *p*. *p* may be a file object or any object with a :meth:`~io.IOBase."
|
||||
"readline` method. If *n* is ``0``, exactly one line is read, regardless of "
|
||||
"the length of the line. If *n* is greater than ``0``, no more than *n* "
|
||||
"bytes will be read from the file; a partial line can be returned. In both "
|
||||
"cases, an empty string is returned if the end of the file is reached "
|
||||
"immediately. If *n* is less than ``0``, however, one line is read "
|
||||
"regardless of length, but :exc:`EOFError` is raised if the end of the file "
|
||||
"is reached immediately."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/file.rst:67
|
||||
msgid ""
|
||||
"Write object *obj* to file object *p*. The only supported flag for *flags* "
|
||||
"is :const:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written "
|
||||
"instead of the :func:`repr`. Return ``0`` on success or ``-1`` on failure; "
|
||||
"the appropriate exception will be set."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/file.rst:75
|
||||
msgid ""
|
||||
"Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on "
|
||||
"failure; the appropriate exception will be set."
|
||||
msgstr ""
|
|
@ -0,0 +1,93 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/float.rst:6
|
||||
msgid "Floating Point Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:13
|
||||
msgid ""
|
||||
"This subtype of :c:type:`PyObject` represents a Python floating point object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:18
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python floating point "
|
||||
"type. This is the same object as :class:`float` in the Python layer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:24
|
||||
msgid ""
|
||||
"Return true if its argument is a :c:type:`PyFloatObject` or a subtype of :c:"
|
||||
"type:`PyFloatObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:30
|
||||
msgid ""
|
||||
"Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype "
|
||||
"of :c:type:`PyFloatObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:36
|
||||
msgid ""
|
||||
"Create a :c:type:`PyFloatObject` object based on the string value in *str*, "
|
||||
"or *NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:42
|
||||
msgid "Create a :c:type:`PyFloatObject` object from *v*, or *NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:47
|
||||
msgid ""
|
||||
"Return a C :c:type:`double` representation of the contents of *pyfloat*. If "
|
||||
"*pyfloat* is not a Python floating point object but has a :meth:`__float__` "
|
||||
"method, this method will first be called to convert *pyfloat* into a float. "
|
||||
"This method returns ``-1.0`` upon failure, so one should call :c:func:"
|
||||
"`PyErr_Occurred` to check for errors."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:56
|
||||
msgid ""
|
||||
"Return a C :c:type:`double` representation of the contents of *pyfloat*, but "
|
||||
"without error checking."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:62
|
||||
msgid ""
|
||||
"Return a structseq instance which contains information about the precision, "
|
||||
"minimum and maximum values of a float. It's a thin wrapper around the header "
|
||||
"file :file:`float.h`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:69
|
||||
msgid ""
|
||||
"Return the maximum representable finite float *DBL_MAX* as C :c:type:"
|
||||
"`double`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:74
|
||||
msgid ""
|
||||
"Return the minimum normalized positive float *DBL_MIN* as C :c:type:`double`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/float.rst:78
|
||||
msgid ""
|
||||
"Clear the float free list. Return the number of items that could not be "
|
||||
"freed."
|
||||
msgstr ""
|
|
@ -0,0 +1,121 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/function.rst:6
|
||||
msgid "Function Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:10
|
||||
msgid "There are a few functions specific to Python functions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:15
|
||||
msgid "The C structure used for functions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:22
|
||||
msgid ""
|
||||
"This is an instance of :c:type:`PyTypeObject` and represents the Python "
|
||||
"function type. It is exposed to Python programmers as ``types."
|
||||
"FunctionType``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:28
|
||||
msgid ""
|
||||
"Return true if *o* is a function object (has type :c:data:"
|
||||
"`PyFunction_Type`). The parameter must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:34
|
||||
msgid ""
|
||||
"Return a new function object associated with the code object *code*. "
|
||||
"*globals* must be a dictionary with the global variables accessible to the "
|
||||
"function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:37
|
||||
msgid ""
|
||||
"The function's docstring and name are retrieved from the code object. "
|
||||
"*__module__* is retrieved from *globals*. The argument defaults, annotations "
|
||||
"and closure are set to *NULL*. *__qualname__* is set to the same value as "
|
||||
"the function's name."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:44
|
||||
msgid ""
|
||||
"As :c:func:`PyFunction_New`, but also allows setting the function object's "
|
||||
"``__qualname__`` attribute. *qualname* should be a unicode object or NULL; "
|
||||
"if NULL, the ``__qualname__`` attribute is set to the same value as its "
|
||||
"``__name__`` attribute."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:54
|
||||
msgid "Return the code object associated with the function object *op*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:59
|
||||
msgid "Return the globals dictionary associated with the function object *op*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:64
|
||||
msgid ""
|
||||
"Return the *__module__* attribute of the function object *op*. This is "
|
||||
"normally a string containing the module name, but can be set to any other "
|
||||
"object by Python code."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:71
|
||||
msgid ""
|
||||
"Return the argument default values of the function object *op*. This can be "
|
||||
"a tuple of arguments or *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:77
|
||||
msgid ""
|
||||
"Set the argument default values for the function object *op*. *defaults* "
|
||||
"must be *Py_None* or a tuple."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:80 ../Doc/c-api/function.rst:94
|
||||
#: ../Doc/c-api/function.rst:108
|
||||
msgid "Raises :exc:`SystemError` and returns ``-1`` on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:85
|
||||
msgid ""
|
||||
"Return the closure associated with the function object *op*. This can be "
|
||||
"*NULL* or a tuple of cell objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:91
|
||||
msgid ""
|
||||
"Set the closure associated with the function object *op*. *closure* must be "
|
||||
"*Py_None* or a tuple of cell objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:99
|
||||
msgid ""
|
||||
"Return the annotations of the function object *op*. This can be a mutable "
|
||||
"dictionary or *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/function.rst:105
|
||||
msgid ""
|
||||
"Set the annotations for the function object *op*. *annotations* must be a "
|
||||
"dictionary or *Py_None*."
|
||||
msgstr ""
|
|
@ -0,0 +1,198 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:6
|
||||
msgid "Supporting Cyclic Garbage Collection"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:8
|
||||
msgid ""
|
||||
"Python's support for detecting and collecting garbage which involves "
|
||||
"circular references requires support from object types which are \"containers"
|
||||
"\" for other objects which may also be containers. Types which do not store "
|
||||
"references to other objects, or which only store references to atomic types "
|
||||
"(such as numbers or strings), do not need to provide any explicit support "
|
||||
"for garbage collection."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:15
|
||||
msgid ""
|
||||
"To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of "
|
||||
"the type object must include the :const:`Py_TPFLAGS_HAVE_GC` and provide an "
|
||||
"implementation of the :c:member:`~PyTypeObject.tp_traverse` handler. If "
|
||||
"instances of the type are mutable, a :c:member:`~PyTypeObject.tp_clear` "
|
||||
"implementation must also be provided."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:24
|
||||
msgid ""
|
||||
"Objects with a type with this flag set must conform with the rules "
|
||||
"documented here. For convenience these objects will be referred to as "
|
||||
"container objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:28
|
||||
msgid "Constructors for container types must conform to two rules:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:30
|
||||
msgid ""
|
||||
"The memory for the object must be allocated using :c:func:`PyObject_GC_New` "
|
||||
"or :c:func:`PyObject_GC_NewVar`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:33
|
||||
msgid ""
|
||||
"Once all the fields which may contain references to other containers are "
|
||||
"initialized, it must call :c:func:`PyObject_GC_Track`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:39
|
||||
msgid ""
|
||||
"Analogous to :c:func:`PyObject_New` but for container objects with the :"
|
||||
"const:`Py_TPFLAGS_HAVE_GC` flag set."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:45
|
||||
msgid ""
|
||||
"Analogous to :c:func:`PyObject_NewVar` but for container objects with the :"
|
||||
"const:`Py_TPFLAGS_HAVE_GC` flag set."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:51
|
||||
msgid ""
|
||||
"Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the "
|
||||
"resized object or *NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:57
|
||||
msgid ""
|
||||
"Adds the object *op* to the set of container objects tracked by the "
|
||||
"collector. The collector can run at unexpected times so objects must be "
|
||||
"valid while being tracked. This should be called once all the fields "
|
||||
"followed by the :c:member:`~PyTypeObject.tp_traverse` handler become valid, "
|
||||
"usually near the end of the constructor."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:66
|
||||
msgid ""
|
||||
"A macro version of :c:func:`PyObject_GC_Track`. It should not be used for "
|
||||
"extension modules."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:69
|
||||
msgid ""
|
||||
"Similarly, the deallocator for the object must conform to a similar pair of "
|
||||
"rules:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:72
|
||||
msgid ""
|
||||
"Before fields which refer to other containers are invalidated, :c:func:"
|
||||
"`PyObject_GC_UnTrack` must be called."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:75
|
||||
msgid ""
|
||||
"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:80
|
||||
msgid ""
|
||||
"Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:"
|
||||
"func:`PyObject_GC_NewVar`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:86
|
||||
msgid ""
|
||||
"Remove the object *op* from the set of container objects tracked by the "
|
||||
"collector. Note that :c:func:`PyObject_GC_Track` can be called again on "
|
||||
"this object to add it back to the set of tracked objects. The deallocator (:"
|
||||
"c:member:`~PyTypeObject.tp_dealloc` handler) should call this for the object "
|
||||
"before any of the fields used by the :c:member:`~PyTypeObject.tp_traverse` "
|
||||
"handler become invalid."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:95
|
||||
msgid ""
|
||||
"A macro version of :c:func:`PyObject_GC_UnTrack`. It should not be used for "
|
||||
"extension modules."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:98
|
||||
msgid ""
|
||||
"The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function "
|
||||
"parameter of this type:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:103
|
||||
msgid ""
|
||||
"Type of the visitor function passed to the :c:member:`~PyTypeObject."
|
||||
"tp_traverse` handler. The function should be called with an object to "
|
||||
"traverse as *object* and the third parameter to the :c:member:`~PyTypeObject."
|
||||
"tp_traverse` handler as *arg*. The Python core uses several visitor "
|
||||
"functions to implement cyclic garbage detection; it's not expected that "
|
||||
"users will need to write their own visitor functions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:110
|
||||
msgid ""
|
||||
"The :c:member:`~PyTypeObject.tp_traverse` handler must have the following "
|
||||
"type:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:115
|
||||
msgid ""
|
||||
"Traversal function for a container object. Implementations must call the "
|
||||
"*visit* function for each object directly contained by *self*, with the "
|
||||
"parameters to *visit* being the contained object and the *arg* value passed "
|
||||
"to the handler. The *visit* function must not be called with a *NULL* "
|
||||
"object argument. If *visit* returns a non-zero value that value should be "
|
||||
"returned immediately."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:122
|
||||
msgid ""
|
||||
"To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:"
|
||||
"func:`Py_VISIT` macro is provided. In order to use this macro, the :c:"
|
||||
"member:`~PyTypeObject.tp_traverse` implementation must name its arguments "
|
||||
"exactly *visit* and *arg*:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:129
|
||||
msgid ""
|
||||
"If *o* is not *NULL*, call the *visit* callback, with arguments *o* and "
|
||||
"*arg*. If *visit* returns a non-zero value, then return it. Using this "
|
||||
"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:142
|
||||
msgid ""
|
||||
"The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:"
|
||||
"`inquiry` type, or *NULL* if the object is immutable."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gcsupport.rst:148
|
||||
msgid ""
|
||||
"Drop references that may have created reference cycles. Immutable objects "
|
||||
"do not have to define this method since they can never directly create "
|
||||
"reference cycles. Note that the object must still be valid after calling "
|
||||
"this method (don't just call :c:func:`Py_DECREF` on a reference). The "
|
||||
"collector will call this method if it detects that this object is involved "
|
||||
"in a reference cycle."
|
||||
msgstr ""
|
|
@ -0,0 +1,60 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/gen.rst:6
|
||||
msgid "Generator Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gen.rst:8
|
||||
msgid ""
|
||||
"Generator objects are what Python uses to implement generator iterators. "
|
||||
"They are normally created by iterating over a function that yields values, "
|
||||
"rather than explicitly calling :c:func:`PyGen_New` or :c:func:"
|
||||
"`PyGen_NewWithQualName`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gen.rst:15
|
||||
msgid "The C structure used for generator objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gen.rst:20
|
||||
msgid "The type object corresponding to generator objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gen.rst:25
|
||||
msgid "Return true if *ob* is a generator object; *ob* must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gen.rst:30
|
||||
msgid "Return true if *ob*'s type is *PyGen_Type*; *ob* must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gen.rst:35
|
||||
msgid ""
|
||||
"Create and return a new generator object based on the *frame* object. A "
|
||||
"reference to *frame* is stolen by this function. The argument must not be "
|
||||
"*NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/gen.rst:41
|
||||
msgid ""
|
||||
"Create and return a new generator object based on the *frame* object, with "
|
||||
"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference "
|
||||
"to *frame* is stolen by this function. The *frame* argument must not be "
|
||||
"*NULL*."
|
||||
msgstr ""
|
|
@ -0,0 +1,322 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/import.rst:6
|
||||
msgid "Importing Modules"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:16
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyImport_ImportModuleEx` below, "
|
||||
"leaving the *globals* and *locals* arguments set to *NULL* and *level* set "
|
||||
"to 0. When the *name* argument contains a dot (when it specifies a "
|
||||
"submodule of a package), the *fromlist* argument is set to the list "
|
||||
"``['*']`` so that the return value is the named module rather than the top-"
|
||||
"level package containing it as would otherwise be the case. (Unfortunately, "
|
||||
"this has an additional side effect when *name* in fact specifies a "
|
||||
"subpackage instead of a submodule: the submodules specified in the package's "
|
||||
"``__all__`` variable are loaded.) Return a new reference to the imported "
|
||||
"module, or *NULL* with an exception set on failure. A failing import of a "
|
||||
"module doesn't leave the module in :data:`sys.modules`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:28 ../Doc/c-api/import.rst:89
|
||||
msgid "This function always uses absolute imports."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:33
|
||||
msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:35
|
||||
msgid ""
|
||||
"This function used to fail immediately when the import lock was held by "
|
||||
"another thread. In Python 3.3 though, the locking scheme switched to per-"
|
||||
"module locks for most purposes, so this function's special behaviour isn't "
|
||||
"needed anymore."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:46
|
||||
msgid ""
|
||||
"Import a module. This is best described by referring to the built-in Python "
|
||||
"function :func:`__import__`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:49 ../Doc/c-api/import.rst:65
|
||||
msgid ""
|
||||
"The return value is a new reference to the imported module or top-level "
|
||||
"package, or *NULL* with an exception set on failure. Like for :func:"
|
||||
"`__import__`, the return value when a submodule of a package was requested "
|
||||
"is normally the top-level package, unless a non-empty *fromlist* was given."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:55
|
||||
msgid ""
|
||||
"Failing imports remove incomplete module objects, like with :c:func:"
|
||||
"`PyImport_ImportModule`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:61
|
||||
msgid ""
|
||||
"Import a module. This is best described by referring to the built-in Python "
|
||||
"function :func:`__import__`, as the standard :func:`__import__` function "
|
||||
"calls this function directly."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:75
|
||||
msgid ""
|
||||
"Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a "
|
||||
"UTF-8 encoded string instead of a Unicode object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:78
|
||||
msgid "Negative values for *level* are no longer accepted."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:83
|
||||
msgid ""
|
||||
"This is a higher-level interface that calls the current \"import hook "
|
||||
"function\" (with an explicit *level* of 0, meaning absolute import). It "
|
||||
"invokes the :func:`__import__` function from the ``__builtins__`` of the "
|
||||
"current globals. This means that the import is done using whatever import "
|
||||
"hooks are installed in the current environment."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:94
|
||||
msgid ""
|
||||
"Reload a module. Return a new reference to the reloaded module, or *NULL* "
|
||||
"with an exception set on failure (the module still exists in this case)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:100
|
||||
msgid ""
|
||||
"Return the module object corresponding to a module name. The *name* "
|
||||
"argument may be of the form ``package.module``. First check the modules "
|
||||
"dictionary if there's one there, and if not, create a new one and insert it "
|
||||
"in the modules dictionary. Return *NULL* with an exception set on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:107
|
||||
msgid ""
|
||||
"This function does not load or import the module; if the module wasn't "
|
||||
"already loaded, you will get an empty module object. Use :c:func:"
|
||||
"`PyImport_ImportModule` or one of its variants to import a module. Package "
|
||||
"structures implied by a dotted name for *name* are not created if not "
|
||||
"already present."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:117
|
||||
msgid ""
|
||||
"Similar to :c:func:`PyImport_AddModuleObject`, but the name is a UTF-8 "
|
||||
"encoded string instead of a Unicode object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:125
|
||||
msgid ""
|
||||
"Given a module name (possibly of the form ``package.module``) and a code "
|
||||
"object read from a Python bytecode file or obtained from the built-in "
|
||||
"function :func:`compile`, load the module. Return a new reference to the "
|
||||
"module object, or *NULL* with an exception set if an error occurred. *name* "
|
||||
"is removed from :attr:`sys.modules` in error cases, even if *name* was "
|
||||
"already in :attr:`sys.modules` on entry to :c:func:"
|
||||
"`PyImport_ExecCodeModule`. Leaving incompletely initialized modules in :"
|
||||
"attr:`sys.modules` is dangerous, as imports of such modules have no way to "
|
||||
"know that the module object is an unknown (and probably damaged with respect "
|
||||
"to the module author's intents) state."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:135
|
||||
msgid ""
|
||||
"The module's :attr:`__spec__` and :attr:`__loader__` will be set, if not set "
|
||||
"already, with the appropriate values. The spec's loader will be set to the "
|
||||
"module's ``__loader__`` (if set) and to an instance of :class:"
|
||||
"`SourceFileLoader` otherwise."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:140
|
||||
msgid ""
|
||||
"The module's :attr:`__file__` attribute will be set to the code object's :c:"
|
||||
"member:`co_filename`. If applicable, :attr:`__cached__` will also be set."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:144
|
||||
msgid ""
|
||||
"This function will reload the module if it was already imported. See :c:"
|
||||
"func:`PyImport_ReloadModule` for the intended way to reload a module."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:147
|
||||
msgid ""
|
||||
"If *name* points to a dotted name of the form ``package.module``, any "
|
||||
"package structures not already created will still not be created."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:150
|
||||
msgid ""
|
||||
"See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:"
|
||||
"`PyImport_ExecCodeModuleWithPathnames`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:156
|
||||
msgid ""
|
||||
"Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute "
|
||||
"of the module object is set to *pathname* if it is non-``NULL``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:159
|
||||
msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:164
|
||||
msgid ""
|
||||
"Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`__cached__` "
|
||||
"attribute of the module object is set to *cpathname* if it is non-``NULL``. "
|
||||
"Of the three functions, this is the preferred one to use."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:173
|
||||
msgid ""
|
||||
"Like :c:func:`PyImport_ExecCodeModuleObject`, but *name*, *pathname* and "
|
||||
"*cpathname* are UTF-8 encoded strings. Attempts are also made to figure out "
|
||||
"what the value for *pathname* should be from *cpathname* if the former is "
|
||||
"set to ``NULL``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:179
|
||||
msgid ""
|
||||
"Uses :func:`imp.source_from_cache()` in calculating the source path if only "
|
||||
"the bytecode path is provided."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:186
|
||||
msgid ""
|
||||
"Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` "
|
||||
"file). The magic number should be present in the first four bytes of the "
|
||||
"bytecode file, in little-endian byte order. Returns -1 on error."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:190
|
||||
msgid "Return value of -1 upon failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:196
|
||||
msgid ""
|
||||
"Return the magic tag string for :pep:`3147` format Python bytecode file "
|
||||
"names. Keep in mind that the value at ``sys.implementation.cache_tag`` is "
|
||||
"authoritative and should be used instead of this function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:204
|
||||
msgid ""
|
||||
"Return the dictionary used for the module administration (a.k.a. ``sys."
|
||||
"modules``). Note that this is a per-interpreter variable."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:210
|
||||
msgid ""
|
||||
"Return a finder object for a :data:`sys.path`/:attr:`pkg.__path__` item "
|
||||
"*path*, possibly by fetching it from the :data:`sys.path_importer_cache` "
|
||||
"dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook "
|
||||
"is found that can handle the path item. Return ``None`` if no hook could; "
|
||||
"this tells our caller that the :term:`path based finder` could not find a "
|
||||
"finder for this path item. Cache the result in :data:`sys."
|
||||
"path_importer_cache`. Return a new reference to the finder object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:221
|
||||
msgid "Initialize the import mechanism. For internal use only."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:226
|
||||
msgid "Empty the module table. For internal use only."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:231
|
||||
msgid "Finalize the import mechanism. For internal use only."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:236
|
||||
msgid "For internal use only."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:241
|
||||
msgid ""
|
||||
"Load a frozen module named *name*. Return ``1`` for success, ``0`` if the "
|
||||
"module is not found, and ``-1`` with an exception set if the initialization "
|
||||
"failed. To access the imported module on a successful load, use :c:func:"
|
||||
"`PyImport_ImportModule`. (Note the misnomer --- this function would reload "
|
||||
"the module if it was already imported.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:249
|
||||
msgid "The ``__file__`` attribute is no longer set on the module."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:255
|
||||
msgid ""
|
||||
"Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a "
|
||||
"UTF-8 encoded string instead of a Unicode object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:263
|
||||
msgid ""
|
||||
"This is the structure type definition for frozen module descriptors, as "
|
||||
"generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the "
|
||||
"Python source distribution). Its definition, found in :file:`Include/import."
|
||||
"h`, is::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:277
|
||||
msgid ""
|
||||
"This pointer is initialized to point to an array of :c:type:`struct _frozen` "
|
||||
"records, terminated by one whose members are all *NULL* or zero. When a "
|
||||
"frozen module is imported, it is searched in this table. Third-party code "
|
||||
"could play tricks with this to provide a dynamically created collection of "
|
||||
"frozen modules."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:285
|
||||
msgid ""
|
||||
"Add a single module to the existing table of built-in modules. This is a "
|
||||
"convenience wrapper around :c:func:`PyImport_ExtendInittab`, returning "
|
||||
"``-1`` if the table could not be extended. The new module can be imported "
|
||||
"by the name *name*, and uses the function *initfunc* as the initialization "
|
||||
"function called on the first attempted import. This should be called "
|
||||
"before :c:func:`Py_Initialize`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:295
|
||||
msgid ""
|
||||
"Structure describing a single entry in the list of built-in modules. Each "
|
||||
"of these structures gives the name and initialization function for a module "
|
||||
"built into the interpreter. The name is an ASCII encoded string. Programs "
|
||||
"which embed Python may use an array of these structures in conjunction with :"
|
||||
"c:func:`PyImport_ExtendInittab` to provide additional built-in modules. The "
|
||||
"structure is defined in :file:`Include/import.h` as::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/import.rst:310
|
||||
msgid ""
|
||||
"Add a collection of modules to the table of built-in modules. The *newtab* "
|
||||
"array must end with a sentinel entry which contains *NULL* for the :attr:"
|
||||
"`name` field; failure to provide the sentinel value can result in a memory "
|
||||
"fault. Returns ``0`` on success or ``-1`` if insufficient memory could be "
|
||||
"allocated to extend the internal table. In the event of failure, no modules "
|
||||
"are added to the internal table. This should be called before :c:func:"
|
||||
"`Py_Initialize`."
|
||||
msgstr ""
|
|
@ -0,0 +1,29 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/index.rst:5
|
||||
msgid "Python/C API Reference Manual"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/index.rst:7
|
||||
msgid ""
|
||||
"This manual documents the API used by C and C++ programmers who want to "
|
||||
"write extension modules or embed Python. It is a companion to :ref:"
|
||||
"`extending-index`, which describes the general principles of extension "
|
||||
"writing but does not document the API functions in detail."
|
||||
msgstr ""
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,641 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/intro.rst:8
|
||||
msgid "Introduction"
|
||||
msgstr "Introduction"
|
||||
|
||||
#: ../Doc/c-api/intro.rst:10
|
||||
msgid ""
|
||||
"The Application Programmer's Interface to Python gives C and C++ programmers "
|
||||
"access to the Python interpreter at a variety of levels. The API is equally "
|
||||
"usable from C++, but for brevity it is generally referred to as the Python/C "
|
||||
"API. There are two fundamentally different reasons for using the Python/C "
|
||||
"API. The first reason is to write *extension modules* for specific purposes; "
|
||||
"these are C modules that extend the Python interpreter. This is probably "
|
||||
"the most common use. The second reason is to use Python as a component in a "
|
||||
"larger application; this technique is generally referred to as :dfn:"
|
||||
"`embedding` Python in an application."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:20
|
||||
msgid ""
|
||||
"Writing an extension module is a relatively well-understood process, where "
|
||||
"a \"cookbook\" approach works well. There are several tools that automate "
|
||||
"the process to some extent. While people have embedded Python in other "
|
||||
"applications since its early existence, the process of embedding Python is "
|
||||
"less straightforward than writing an extension."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:26
|
||||
msgid ""
|
||||
"Many API functions are useful independent of whether you're embedding or "
|
||||
"extending Python; moreover, most applications that embed Python will need "
|
||||
"to provide a custom extension as well, so it's probably a good idea to "
|
||||
"become familiar with writing an extension before attempting to embed Python "
|
||||
"in a real application."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:36
|
||||
msgid "Include Files"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:38
|
||||
msgid ""
|
||||
"All function, type and macro definitions needed to use the Python/C API are "
|
||||
"included in your code by the following line::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:43
|
||||
msgid ""
|
||||
"This implies inclusion of the following standard headers: ``<stdio.h>``, "
|
||||
"``<string.h>``, ``<errno.h>``, ``<limits.h>``, ``<assert.h>`` and ``<stdlib."
|
||||
"h>`` (if available)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:49
|
||||
msgid ""
|
||||
"Since Python may define some pre-processor definitions which affect the "
|
||||
"standard headers on some systems, you *must* include :file:`Python.h` before "
|
||||
"any standard headers are included."
|
||||
msgstr ""
|
||||
"Python pouvant définir certaines définitions pré-processeur qui affectent "
|
||||
"les têtes standard sur certains systèmes, vous *devez* inclure :file:`Python."
|
||||
"h` avant les en-têtes standards."
|
||||
|
||||
#: ../Doc/c-api/intro.rst:53
|
||||
msgid ""
|
||||
"All user visible names defined by Python.h (except those defined by the "
|
||||
"included standard headers) have one of the prefixes ``Py`` or ``_Py``. "
|
||||
"Names beginning with ``_Py`` are for internal use by the Python "
|
||||
"implementation and should not be used by extension writers. Structure member "
|
||||
"names do not have a reserved prefix."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:58
|
||||
msgid ""
|
||||
"**Important:** user code should never define names that begin with ``Py`` or "
|
||||
"``_Py``. This confuses the reader, and jeopardizes the portability of the "
|
||||
"user code to future Python versions, which may define additional names "
|
||||
"beginning with one of these prefixes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:63
|
||||
msgid ""
|
||||
"The header files are typically installed with Python. On Unix, these are "
|
||||
"located in the directories :file:`{prefix}/include/pythonversion/` and :file:"
|
||||
"`{exec_prefix}/include/pythonversion/`, where :envvar:`prefix` and :envvar:"
|
||||
"`exec_prefix` are defined by the corresponding parameters to Python's :"
|
||||
"program:`configure` script and *version* is ``'%d.%d' % sys."
|
||||
"version_info[:2]``. On Windows, the headers are installed in :file:"
|
||||
"`{prefix}/include`, where :envvar:`prefix` is the installation directory "
|
||||
"specified to the installer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:72
|
||||
msgid ""
|
||||
"To include the headers, place both directories (if different) on your "
|
||||
"compiler's search path for includes. Do *not* place the parent directories "
|
||||
"on the search path and then use ``#include <pythonX.Y/Python.h>``; this will "
|
||||
"break on multi-platform builds since the platform independent headers under :"
|
||||
"envvar:`prefix` include the platform specific headers from :envvar:"
|
||||
"`exec_prefix`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:79
|
||||
msgid ""
|
||||
"C++ users should note that though the API is defined entirely using C, the "
|
||||
"header files do properly declare the entry points to be ``extern \"C\"``, so "
|
||||
"there is no need to do anything special to use the API from C++."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:87
|
||||
msgid "Objects, Types and Reference Counts"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:91
|
||||
msgid ""
|
||||
"Most Python/C API functions have one or more arguments as well as a return "
|
||||
"value of type :c:type:`PyObject\\*`. This type is a pointer to an opaque "
|
||||
"data type representing an arbitrary Python object. Since all Python object "
|
||||
"types are treated the same way by the Python language in most situations (e."
|
||||
"g., assignments, scope rules, and argument passing), it is only fitting that "
|
||||
"they should be represented by a single C type. Almost all Python objects "
|
||||
"live on the heap: you never declare an automatic or static variable of type :"
|
||||
"c:type:`PyObject`, only pointer variables of type :c:type:`PyObject\\*` can "
|
||||
"be declared. The sole exception are the type objects; since these must "
|
||||
"never be deallocated, they are typically static :c:type:`PyTypeObject` "
|
||||
"objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:102
|
||||
msgid ""
|
||||
"All Python objects (even Python integers) have a :dfn:`type` and a :dfn:"
|
||||
"`reference count`. An object's type determines what kind of object it is (e."
|
||||
"g., an integer, a list, or a user-defined function; there are many more as "
|
||||
"explained in :ref:`types`). For each of the well-known types there is a "
|
||||
"macro to check whether an object is of that type; for instance, "
|
||||
"``PyList_Check(a)`` is true if (and only if) the object pointed to by *a* is "
|
||||
"a Python list."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:113
|
||||
msgid "Reference Counts"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:115
|
||||
msgid ""
|
||||
"The reference count is important because today's computers have a finite "
|
||||
"(and often severely limited) memory size; it counts how many different "
|
||||
"places there are that have a reference to an object. Such a place could be "
|
||||
"another object, or a global (or static) C variable, or a local variable in "
|
||||
"some C function. When an object's reference count becomes zero, the object "
|
||||
"is deallocated. If it contains references to other objects, their "
|
||||
"reference count is decremented. Those other objects may be deallocated in "
|
||||
"turn, if this decrement makes their reference count become zero, and so on. "
|
||||
"(There's an obvious problem with objects that reference each other here; "
|
||||
"for now, the solution is \"don't do that.\")"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:130
|
||||
msgid ""
|
||||
"Reference counts are always manipulated explicitly. The normal way is to "
|
||||
"use the macro :c:func:`Py_INCREF` to increment an object's reference count "
|
||||
"by one, and :c:func:`Py_DECREF` to decrement it by one. The :c:func:"
|
||||
"`Py_DECREF` macro is considerably more complex than the incref one, since it "
|
||||
"must check whether the reference count becomes zero and then cause the "
|
||||
"object's deallocator to be called. The deallocator is a function pointer "
|
||||
"contained in the object's type structure. The type-specific deallocator "
|
||||
"takes care of decrementing the reference counts for other objects contained "
|
||||
"in the object if this is a compound object type, such as a list, as well as "
|
||||
"performing any additional finalization that's needed. There's no chance "
|
||||
"that the reference count can overflow; at least as many bits are used to "
|
||||
"hold the reference count as there are distinct memory locations in virtual "
|
||||
"memory (assuming ``sizeof(Py_ssize_t) >= sizeof(void*)``). Thus, the "
|
||||
"reference count increment is a simple operation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:144
|
||||
msgid ""
|
||||
"It is not necessary to increment an object's reference count for every "
|
||||
"local variable that contains a pointer to an object. In theory, the "
|
||||
"object's reference count goes up by one when the variable is made to point "
|
||||
"to it and it goes down by one when the variable goes out of scope. "
|
||||
"However, these two cancel each other out, so at the end the reference count "
|
||||
"hasn't changed. The only real reason to use the reference count is to "
|
||||
"prevent the object from being deallocated as long as our variable is "
|
||||
"pointing to it. If we know that there is at least one other reference to "
|
||||
"the object that lives at least as long as our variable, there is no need to "
|
||||
"increment the reference count temporarily. An important situation where "
|
||||
"this arises is in objects that are passed as arguments to C functions in an "
|
||||
"extension module that are called from Python; the call mechanism guarantees "
|
||||
"to hold a reference to every argument for the duration of the call."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:158
|
||||
msgid ""
|
||||
"However, a common pitfall is to extract an object from a list and hold on to "
|
||||
"it for a while without incrementing its reference count. Some other "
|
||||
"operation might conceivably remove the object from the list, decrementing "
|
||||
"its reference count and possible deallocating it. The real danger is that "
|
||||
"innocent-looking operations may invoke arbitrary Python code which could do "
|
||||
"this; there is a code path which allows control to flow back to the user "
|
||||
"from a :c:func:`Py_DECREF`, so almost any operation is potentially dangerous."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:166
|
||||
msgid ""
|
||||
"A safe approach is to always use the generic operations (functions whose "
|
||||
"name begins with ``PyObject_``, ``PyNumber_``, ``PySequence_`` or "
|
||||
"``PyMapping_``). These operations always increment the reference count of "
|
||||
"the object they return. This leaves the caller with the responsibility to "
|
||||
"call :c:func:`Py_DECREF` when they are done with the result; this soon "
|
||||
"becomes second nature."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:176
|
||||
msgid "Reference Count Details"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:178
|
||||
msgid ""
|
||||
"The reference count behavior of functions in the Python/C API is best "
|
||||
"explained in terms of *ownership of references*. Ownership pertains to "
|
||||
"references, never to objects (objects are not owned: they are always "
|
||||
"shared). \"Owning a reference\" means being responsible for calling "
|
||||
"Py_DECREF on it when the reference is no longer needed. Ownership can also "
|
||||
"be transferred, meaning that the code that receives ownership of the "
|
||||
"reference then becomes responsible for eventually decref'ing it by calling :"
|
||||
"c:func:`Py_DECREF` or :c:func:`Py_XDECREF` when it's no longer needed---or "
|
||||
"passing on this responsibility (usually to its caller). When a function "
|
||||
"passes ownership of a reference on to its caller, the caller is said to "
|
||||
"receive a *new* reference. When no ownership is transferred, the caller is "
|
||||
"said to *borrow* the reference. Nothing needs to be done for a borrowed "
|
||||
"reference."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:191
|
||||
msgid ""
|
||||
"Conversely, when a calling function passes in a reference to an object, "
|
||||
"there are two possibilities: the function *steals* a reference to the "
|
||||
"object, or it does not. *Stealing a reference* means that when you pass a "
|
||||
"reference to a function, that function assumes that it now owns that "
|
||||
"reference, and you are not responsible for it any longer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:201
|
||||
msgid ""
|
||||
"Few functions steal references; the two notable exceptions are :c:func:"
|
||||
"`PyList_SetItem` and :c:func:`PyTuple_SetItem`, which steal a reference to "
|
||||
"the item (but not to the tuple or list into which the item is put!). These "
|
||||
"functions were designed to steal a reference because of a common idiom for "
|
||||
"populating a tuple or list with newly created objects; for example, the code "
|
||||
"to create the tuple ``(1, 2, \"three\")`` could look like this (forgetting "
|
||||
"about error handling for the moment; a better way to code this is shown "
|
||||
"below)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:216
|
||||
msgid ""
|
||||
"Here, :c:func:`PyLong_FromLong` returns a new reference which is immediately "
|
||||
"stolen by :c:func:`PyTuple_SetItem`. When you want to keep using an object "
|
||||
"although the reference to it will be stolen, use :c:func:`Py_INCREF` to grab "
|
||||
"another reference before calling the reference-stealing function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:221
|
||||
msgid ""
|
||||
"Incidentally, :c:func:`PyTuple_SetItem` is the *only* way to set tuple "
|
||||
"items; :c:func:`PySequence_SetItem` and :c:func:`PyObject_SetItem` refuse to "
|
||||
"do this since tuples are an immutable data type. You should only use :c:"
|
||||
"func:`PyTuple_SetItem` for tuples that you are creating yourself."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:226
|
||||
msgid ""
|
||||
"Equivalent code for populating a list can be written using :c:func:"
|
||||
"`PyList_New` and :c:func:`PyList_SetItem`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:229
|
||||
msgid ""
|
||||
"However, in practice, you will rarely use these ways of creating and "
|
||||
"populating a tuple or list. There's a generic function, :c:func:"
|
||||
"`Py_BuildValue`, that can create most common objects from C values, directed "
|
||||
"by a :dfn:`format string`. For example, the above two blocks of code could "
|
||||
"be replaced by the following (which also takes care of the error checking)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:240
|
||||
msgid ""
|
||||
"It is much more common to use :c:func:`PyObject_SetItem` and friends with "
|
||||
"items whose references you are only borrowing, like arguments that were "
|
||||
"passed in to the function you are writing. In that case, their behaviour "
|
||||
"regarding reference counts is much saner, since you don't have to increment "
|
||||
"a reference count so you can give a reference away (\"have it be stolen\"). "
|
||||
"For example, this function sets all items of a list (actually, any mutable "
|
||||
"sequence) to a given item::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:270
|
||||
msgid ""
|
||||
"The situation is slightly different for function return values. While "
|
||||
"passing a reference to most functions does not change your ownership "
|
||||
"responsibilities for that reference, many functions that return a reference "
|
||||
"to an object give you ownership of the reference. The reason is simple: in "
|
||||
"many cases, the returned object is created on the fly, and the reference "
|
||||
"you get is the only reference to the object. Therefore, the generic "
|
||||
"functions that return object references, like :c:func:`PyObject_GetItem` "
|
||||
"and :c:func:`PySequence_GetItem`, always return a new reference (the caller "
|
||||
"becomes the owner of the reference)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:279
|
||||
msgid ""
|
||||
"It is important to realize that whether you own a reference returned by a "
|
||||
"function depends on which function you call only --- *the plumage* (the type "
|
||||
"of the object passed as an argument to the function) *doesn't enter into it!"
|
||||
"* Thus, if you extract an item from a list using :c:func:`PyList_GetItem`, "
|
||||
"you don't own the reference --- but if you obtain the same item from the "
|
||||
"same list using :c:func:`PySequence_GetItem` (which happens to take exactly "
|
||||
"the same arguments), you do own a reference to the returned object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:291
|
||||
msgid ""
|
||||
"Here is an example of how you could write a function that computes the sum "
|
||||
"of the items in a list of integers; once using :c:func:`PyList_GetItem`, "
|
||||
"and once using :c:func:`PySequence_GetItem`. ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:355
|
||||
msgid "Types"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:357
|
||||
msgid ""
|
||||
"There are few other data types that play a significant role in the Python/C "
|
||||
"API; most are simple C types such as :c:type:`int`, :c:type:`long`, :c:type:"
|
||||
"`double` and :c:type:`char\\*`. A few structure types are used to describe "
|
||||
"static tables used to list the functions exported by a module or the data "
|
||||
"attributes of a new object type, and another is used to describe the value "
|
||||
"of a complex number. These will be discussed together with the functions "
|
||||
"that use them."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:369
|
||||
msgid "Exceptions"
|
||||
msgstr "Les exceptions"
|
||||
|
||||
#: ../Doc/c-api/intro.rst:371
|
||||
msgid ""
|
||||
"The Python programmer only needs to deal with exceptions if specific error "
|
||||
"handling is required; unhandled exceptions are automatically propagated to "
|
||||
"the caller, then to the caller's caller, and so on, until they reach the top-"
|
||||
"level interpreter, where they are reported to the user accompanied by a "
|
||||
"stack traceback."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:379
|
||||
msgid ""
|
||||
"For C programmers, however, error checking always has to be explicit. All "
|
||||
"functions in the Python/C API can raise exceptions, unless an explicit claim "
|
||||
"is made otherwise in a function's documentation. In general, when a "
|
||||
"function encounters an error, it sets an exception, discards any object "
|
||||
"references that it owns, and returns an error indicator. If not documented "
|
||||
"otherwise, this indicator is either *NULL* or ``-1``, depending on the "
|
||||
"function's return type. A few functions return a Boolean true/false result, "
|
||||
"with false indicating an error. Very few functions return no explicit error "
|
||||
"indicator or have an ambiguous return value, and require explicit testing "
|
||||
"for errors with :c:func:`PyErr_Occurred`. These exceptions are always "
|
||||
"explicitly documented."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:394
|
||||
msgid ""
|
||||
"Exception state is maintained in per-thread storage (this is equivalent to "
|
||||
"using global storage in an unthreaded application). A thread can be in one "
|
||||
"of two states: an exception has occurred, or not. The function :c:func:"
|
||||
"`PyErr_Occurred` can be used to check for this: it returns a borrowed "
|
||||
"reference to the exception type object when an exception has occurred, and "
|
||||
"*NULL* otherwise. There are a number of functions to set the exception "
|
||||
"state: :c:func:`PyErr_SetString` is the most common (though not the most "
|
||||
"general) function to set the exception state, and :c:func:`PyErr_Clear` "
|
||||
"clears the exception state."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:404
|
||||
msgid ""
|
||||
"The full exception state consists of three objects (all of which can be "
|
||||
"*NULL*): the exception type, the corresponding exception value, and the "
|
||||
"traceback. These have the same meanings as the Python result of ``sys."
|
||||
"exc_info()``; however, they are not the same: the Python objects represent "
|
||||
"the last exception being handled by a Python :keyword:`try` ... :keyword:"
|
||||
"`except` statement, while the C level exception state only exists while an "
|
||||
"exception is being passed on between C functions until it reaches the Python "
|
||||
"bytecode interpreter's main loop, which takes care of transferring it to "
|
||||
"``sys.exc_info()`` and friends."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:416
|
||||
msgid ""
|
||||
"Note that starting with Python 1.5, the preferred, thread-safe way to access "
|
||||
"the exception state from Python code is to call the function :func:`sys."
|
||||
"exc_info`, which returns the per-thread exception state for Python code. "
|
||||
"Also, the semantics of both ways to access the exception state have changed "
|
||||
"so that a function which catches an exception will save and restore its "
|
||||
"thread's exception state so as to preserve the exception state of its "
|
||||
"caller. This prevents common bugs in exception handling code caused by an "
|
||||
"innocent-looking function overwriting the exception being handled; it also "
|
||||
"reduces the often unwanted lifetime extension for objects that are "
|
||||
"referenced by the stack frames in the traceback."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:427
|
||||
msgid ""
|
||||
"As a general principle, a function that calls another function to perform "
|
||||
"some task should check whether the called function raised an exception, and "
|
||||
"if so, pass the exception state on to its caller. It should discard any "
|
||||
"object references that it owns, and return an error indicator, but it "
|
||||
"should *not* set another exception --- that would overwrite the exception "
|
||||
"that was just raised, and lose important information about the exact cause "
|
||||
"of the error."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:436
|
||||
msgid ""
|
||||
"A simple example of detecting exceptions and passing them on is shown in "
|
||||
"the :c:func:`sum_sequence` example above. It so happens that this example "
|
||||
"doesn't need to clean up any owned references when it detects an error. The "
|
||||
"following example function shows some error cleanup. First, to remind you "
|
||||
"why you like Python, we show the equivalent Python code::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:451
|
||||
msgid "Here is the corresponding C code, in all its glory::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:503
|
||||
msgid ""
|
||||
"This example represents an endorsed use of the ``goto`` statement in C! It "
|
||||
"illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:"
|
||||
"`PyErr_Clear` to handle specific exceptions, and the use of :c:func:"
|
||||
"`Py_XDECREF` to dispose of owned references that may be *NULL* (note the "
|
||||
"``'X'`` in the name; :c:func:`Py_DECREF` would crash when confronted with a "
|
||||
"*NULL* reference). It is important that the variables used to hold owned "
|
||||
"references are initialized to *NULL* for this to work; likewise, the "
|
||||
"proposed return value is initialized to ``-1`` (failure) and only set to "
|
||||
"success after the final call made is successful."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:517
|
||||
msgid "Embedding Python"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:519
|
||||
msgid ""
|
||||
"The one important task that only embedders (as opposed to extension writers) "
|
||||
"of the Python interpreter have to worry about is the initialization, and "
|
||||
"possibly the finalization, of the Python interpreter. Most functionality of "
|
||||
"the interpreter can only be used after the interpreter has been initialized."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:532
|
||||
msgid ""
|
||||
"The basic initialization function is :c:func:`Py_Initialize`. This "
|
||||
"initializes the table of loaded modules, and creates the fundamental "
|
||||
"modules :mod:`builtins`, :mod:`__main__`, and :mod:`sys`. It also "
|
||||
"initializes the module search path (``sys.path``)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:539
|
||||
msgid ""
|
||||
":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys."
|
||||
"argv``). If this variable is needed by Python code that will be executed "
|
||||
"later, it must be set explicitly with a call to ``PySys_SetArgvEx(argc, "
|
||||
"argv, updatepath)`` after the call to :c:func:`Py_Initialize`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:544
|
||||
msgid ""
|
||||
"On most systems (in particular, on Unix and Windows, although the details "
|
||||
"are slightly different), :c:func:`Py_Initialize` calculates the module "
|
||||
"search path based upon its best guess for the location of the standard "
|
||||
"Python interpreter executable, assuming that the Python library is found in "
|
||||
"a fixed location relative to the Python interpreter executable. In "
|
||||
"particular, it looks for a directory named :file:`lib/python{X.Y}` relative "
|
||||
"to the parent directory where the executable named :file:`python` is found "
|
||||
"on the shell command search path (the environment variable :envvar:`PATH`)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:553
|
||||
msgid ""
|
||||
"For instance, if the Python executable is found in :file:`/usr/local/bin/"
|
||||
"python`, it will assume that the libraries are in :file:`/usr/local/lib/"
|
||||
"python{X.Y}`. (In fact, this particular path is also the \"fallback\" "
|
||||
"location, used when no executable file named :file:`python` is found along :"
|
||||
"envvar:`PATH`.) The user can override this behavior by setting the "
|
||||
"environment variable :envvar:`PYTHONHOME`, or insert additional directories "
|
||||
"in front of the standard path by setting :envvar:`PYTHONPATH`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:568
|
||||
msgid ""
|
||||
"The embedding application can steer the search by calling "
|
||||
"``Py_SetProgramName(file)`` *before* calling :c:func:`Py_Initialize`. Note "
|
||||
"that :envvar:`PYTHONHOME` still overrides this and :envvar:`PYTHONPATH` is "
|
||||
"still inserted in front of the standard path. An application that requires "
|
||||
"total control has to provide its own implementation of :c:func:"
|
||||
"`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, and :c:"
|
||||
"func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:578
|
||||
msgid ""
|
||||
"Sometimes, it is desirable to \"uninitialize\" Python. For instance, the "
|
||||
"application may want to start over (make another call to :c:func:"
|
||||
"`Py_Initialize`) or the application is simply done with its use of Python "
|
||||
"and wants to free memory allocated by Python. This can be accomplished by "
|
||||
"calling :c:func:`Py_FinalizeEx`. The function :c:func:`Py_IsInitialized` "
|
||||
"returns true if Python is currently in the initialized state. More "
|
||||
"information about these functions is given in a later chapter. Notice that :"
|
||||
"c:func:`Py_FinalizeEx` does *not* free all memory allocated by the Python "
|
||||
"interpreter, e.g. memory allocated by extension modules currently cannot be "
|
||||
"released."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:592
|
||||
msgid "Debugging Builds"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:594
|
||||
msgid ""
|
||||
"Python can be built with several macros to enable extra checks of the "
|
||||
"interpreter and extension modules. These checks tend to add a large amount "
|
||||
"of overhead to the runtime so they are not enabled by default."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:598
|
||||
msgid ""
|
||||
"A full list of the various types of debugging builds is in the file :file:"
|
||||
"`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are "
|
||||
"available that support tracing of reference counts, debugging the memory "
|
||||
"allocator, or low-level profiling of the main interpreter loop. Only the "
|
||||
"most frequently-used builds will be described in the remainder of this "
|
||||
"section."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:604
|
||||
msgid ""
|
||||
"Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined "
|
||||
"produces what is generally meant by \"a debug build\" of Python. :c:macro:"
|
||||
"`Py_DEBUG` is enabled in the Unix build by adding ``--with-pydebug`` to the :"
|
||||
"file:`./configure` command. It is also implied by the presence of the not-"
|
||||
"Python-specific :c:macro:`_DEBUG` macro. When :c:macro:`Py_DEBUG` is "
|
||||
"enabled in the Unix build, compiler optimization is disabled."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:611
|
||||
msgid ""
|
||||
"In addition to the reference count debugging described below, the following "
|
||||
"extra checks are performed:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:614
|
||||
msgid "Extra checks are added to the object allocator."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:616
|
||||
msgid "Extra checks are added to the parser and compiler."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:618
|
||||
msgid ""
|
||||
"Downcasts from wide types to narrow types are checked for loss of "
|
||||
"information."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:620
|
||||
msgid ""
|
||||
"A number of assertions are added to the dictionary and set implementations. "
|
||||
"In addition, the set object acquires a :meth:`test_c_api` method."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:623
|
||||
msgid "Sanity checks of the input arguments are added to frame creation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:625
|
||||
msgid ""
|
||||
"The storage for ints is initialized with a known invalid pattern to catch "
|
||||
"reference to uninitialized digits."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:628
|
||||
msgid ""
|
||||
"Low-level tracing and extra exception checking are added to the runtime "
|
||||
"virtual machine."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:631
|
||||
msgid "Extra checks are added to the memory arena implementation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:633
|
||||
msgid "Extra debugging is added to the thread module."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:635
|
||||
msgid "There may be additional checks not mentioned here."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:637
|
||||
msgid ""
|
||||
"Defining :c:macro:`Py_TRACE_REFS` enables reference tracing. When defined, "
|
||||
"a circular doubly linked list of active objects is maintained by adding two "
|
||||
"extra fields to every :c:type:`PyObject`. Total allocations are tracked as "
|
||||
"well. Upon exit, all existing references are printed. (In interactive mode "
|
||||
"this happens after every statement run by the interpreter.) Implied by :c:"
|
||||
"macro:`Py_DEBUG`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/intro.rst:643
|
||||
msgid ""
|
||||
"Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source "
|
||||
"distribution for more detailed information."
|
||||
msgstr ""
|
|
@ -0,0 +1,43 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/iter.rst:6
|
||||
msgid "Iterator Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/iter.rst:8
|
||||
msgid "There are two functions specifically for working with iterators."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/iter.rst:12
|
||||
msgid "Return true if the object *o* supports the iterator protocol."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/iter.rst:17
|
||||
msgid ""
|
||||
"Return the next value from the iteration *o*. The object must be an "
|
||||
"iterator (it is up to the caller to check this). If there are no remaining "
|
||||
"values, returns *NULL* with no exception set. If an error occurs while "
|
||||
"retrieving the item, returns *NULL* and passes along the exception."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/iter.rst:22
|
||||
msgid ""
|
||||
"To write a loop which iterates over an iterator, the C code should look "
|
||||
"something like this::"
|
||||
msgstr ""
|
|
@ -0,0 +1,66 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/iterator.rst:6
|
||||
msgid "Iterator Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/iterator.rst:8
|
||||
msgid ""
|
||||
"Python provides two general-purpose iterator objects. The first, a sequence "
|
||||
"iterator, works with an arbitrary sequence supporting the :meth:"
|
||||
"`__getitem__` method. The second works with a callable object and a "
|
||||
"sentinel value, calling the callable for each item in the sequence, and "
|
||||
"ending the iteration when the sentinel value is returned."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/iterator.rst:17
|
||||
msgid ""
|
||||
"Type object for iterator objects returned by :c:func:`PySeqIter_New` and the "
|
||||
"one-argument form of the :func:`iter` built-in function for built-in "
|
||||
"sequence types."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/iterator.rst:24
|
||||
msgid "Return true if the type of *op* is :c:data:`PySeqIter_Type`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/iterator.rst:29
|
||||
msgid ""
|
||||
"Return an iterator that works with a general sequence object, *seq*. The "
|
||||
"iteration ends when the sequence raises :exc:`IndexError` for the "
|
||||
"subscripting operation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/iterator.rst:36
|
||||
msgid ""
|
||||
"Type object for iterator objects returned by :c:func:`PyCallIter_New` and "
|
||||
"the two-argument form of the :func:`iter` built-in function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/iterator.rst:42
|
||||
msgid "Return true if the type of *op* is :c:data:`PyCallIter_Type`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/iterator.rst:47
|
||||
msgid ""
|
||||
"Return a new iterator. The first parameter, *callable*, can be any Python "
|
||||
"callable object that can be called with no parameters; each call to it "
|
||||
"should return the next item in the iteration. When *callable* returns a "
|
||||
"value equal to *sentinel*, the iteration will be terminated."
|
||||
msgstr ""
|
|
@ -0,0 +1,155 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/list.rst:6
|
||||
msgid "List Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:13
|
||||
msgid "This subtype of :c:type:`PyObject` represents a Python list object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:18
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python list type. "
|
||||
"This is the same object as :class:`list` in the Python layer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:24
|
||||
msgid ""
|
||||
"Return true if *p* is a list object or an instance of a subtype of the list "
|
||||
"type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:30
|
||||
msgid ""
|
||||
"Return true if *p* is a list object, but not an instance of a subtype of the "
|
||||
"list type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:36
|
||||
msgid "Return a new list of length *len* on success, or *NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:40
|
||||
msgid ""
|
||||
"If *len* is greater than zero, the returned list object's items are set to "
|
||||
"``NULL``. Thus you cannot use abstract API functions such as :c:func:"
|
||||
"`PySequence_SetItem` or expose the object to Python code before setting all "
|
||||
"items to a real object with :c:func:`PyList_SetItem`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:50
|
||||
msgid ""
|
||||
"Return the length of the list object in *list*; this is equivalent to "
|
||||
"``len(list)`` on a list object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:56
|
||||
msgid "Macro form of :c:func:`PyList_Size` without error checking."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:61
|
||||
msgid ""
|
||||
"Return the object at position *index* in the list pointed to by *list*. The "
|
||||
"position must be positive, indexing from the end of the list is not "
|
||||
"supported. If *index* is out of bounds, return *NULL* and set an :exc:"
|
||||
"`IndexError` exception."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:69
|
||||
msgid "Macro form of :c:func:`PyList_GetItem` without error checking."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:74
|
||||
msgid ""
|
||||
"Set the item at index *index* in list to *item*. Return ``0`` on success or "
|
||||
"``-1`` on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:79
|
||||
msgid ""
|
||||
"This function \"steals\" a reference to *item* and discards a reference to "
|
||||
"an item already in the list at the affected position."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:85
|
||||
msgid ""
|
||||
"Macro form of :c:func:`PyList_SetItem` without error checking. This is "
|
||||
"normally only used to fill in new lists where there is no previous content."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:90
|
||||
msgid ""
|
||||
"This macro \"steals\" a reference to *item*, and, unlike :c:func:"
|
||||
"`PyList_SetItem`, does *not* discard a reference to any item that is being "
|
||||
"replaced; any reference in *list* at position *i* will be leaked."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:98
|
||||
msgid ""
|
||||
"Insert the item *item* into list *list* in front of index *index*. Return "
|
||||
"``0`` if successful; return ``-1`` and set an exception if unsuccessful. "
|
||||
"Analogous to ``list.insert(index, item)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:105
|
||||
msgid ""
|
||||
"Append the object *item* at the end of list *list*. Return ``0`` if "
|
||||
"successful; return ``-1`` and set an exception if unsuccessful. Analogous "
|
||||
"to ``list.append(item)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:112
|
||||
msgid ""
|
||||
"Return a list of the objects in *list* containing the objects *between* "
|
||||
"*low* and *high*. Return *NULL* and set an exception if unsuccessful. "
|
||||
"Analogous to ``list[low:high]``. Negative indices, as when slicing from "
|
||||
"Python, are not supported."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:120
|
||||
msgid ""
|
||||
"Set the slice of *list* between *low* and *high* to the contents of "
|
||||
"*itemlist*. Analogous to ``list[low:high] = itemlist``. The *itemlist* may "
|
||||
"be *NULL*, indicating the assignment of an empty list (slice deletion). "
|
||||
"Return ``0`` on success, ``-1`` on failure. Negative indices, as when "
|
||||
"slicing from Python, are not supported."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:129
|
||||
msgid ""
|
||||
"Sort the items of *list* in place. Return ``0`` on success, ``-1`` on "
|
||||
"failure. This is equivalent to ``list.sort()``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:135
|
||||
msgid ""
|
||||
"Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on "
|
||||
"failure. This is the equivalent of ``list.reverse()``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:143
|
||||
msgid ""
|
||||
"Return a new tuple object containing the contents of *list*; equivalent to "
|
||||
"``tuple(list)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/list.rst:149
|
||||
msgid "Clear the free list. Return the total number of freed items."
|
||||
msgstr ""
|
|
@ -0,0 +1,282 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/long.rst:6
|
||||
msgid "Integer Objects"
|
||||
msgstr "Objets *Integer*"
|
||||
|
||||
#: ../Doc/c-api/long.rst:11
|
||||
msgid ""
|
||||
"All integers are implemented as \"long\" integer objects of arbitrary size."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:15
|
||||
msgid "This subtype of :c:type:`PyObject` represents a Python integer object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:20
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python integer type. "
|
||||
"This is the same object as :class:`int` in the Python layer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:26
|
||||
msgid ""
|
||||
"Return true if its argument is a :c:type:`PyLongObject` or a subtype of :c:"
|
||||
"type:`PyLongObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:32
|
||||
msgid ""
|
||||
"Return true if its argument is a :c:type:`PyLongObject`, but not a subtype "
|
||||
"of :c:type:`PyLongObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:38
|
||||
msgid ""
|
||||
"Return a new :c:type:`PyLongObject` object from *v*, or *NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:40
|
||||
msgid ""
|
||||
"The current implementation keeps an array of integer objects for all "
|
||||
"integers between ``-5`` and ``256``, when you create an int in that range "
|
||||
"you actually just get back a reference to the existing object. So it should "
|
||||
"be possible to change the value of ``1``. I suspect the behaviour of Python "
|
||||
"in this case is undefined. :-)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:49
|
||||
msgid ""
|
||||
"Return a new :c:type:`PyLongObject` object from a C :c:type:`unsigned long`, "
|
||||
"or *NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:55
|
||||
msgid ""
|
||||
"Return a new :c:type:`PyLongObject` object from a C :c:type:`Py_ssize_t`, or "
|
||||
"*NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:61
|
||||
msgid ""
|
||||
"Return a new :c:type:`PyLongObject` object from a C :c:type:`size_t`, or "
|
||||
"*NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:67
|
||||
msgid ""
|
||||
"Return a new :c:type:`PyLongObject` object from a C :c:type:`long long`, or "
|
||||
"*NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:73
|
||||
msgid ""
|
||||
"Return a new :c:type:`PyLongObject` object from a C :c:type:`unsigned long "
|
||||
"long`, or *NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:79
|
||||
msgid ""
|
||||
"Return a new :c:type:`PyLongObject` object from the integer part of *v*, or "
|
||||
"*NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:85
|
||||
msgid ""
|
||||
"Return a new :c:type:`PyLongObject` based on the string value in *str*, "
|
||||
"which is interpreted according to the radix in *base*. If *pend* is non-"
|
||||
"*NULL*, *\\*pend* will point to the first character in *str* which follows "
|
||||
"the representation of the number. If *base* is ``0``, the radix will be "
|
||||
"determined based on the leading characters of *str*: if *str* starts with "
|
||||
"``'0x'`` or ``'0X'``, radix 16 will be used; if *str* starts with ``'0o'`` "
|
||||
"or ``'0O'``, radix 8 will be used; if *str* starts with ``'0b'`` or "
|
||||
"``'0B'``, radix 2 will be used; otherwise radix 10 will be used. If *base* "
|
||||
"is not ``0``, it must be between ``2`` and ``36``, inclusive. Leading "
|
||||
"spaces are ignored. If there are no digits, :exc:`ValueError` will be "
|
||||
"raised."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:99
|
||||
msgid ""
|
||||
"Convert a sequence of Unicode digits to a Python integer value. The Unicode "
|
||||
"string is first encoded to a byte string using :c:func:"
|
||||
"`PyUnicode_EncodeDecimal` and then converted using :c:func:"
|
||||
"`PyLong_FromString`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:105
|
||||
msgid ""
|
||||
"Deprecated since version 3.3, will be removed in version 4.0: Part of the "
|
||||
"old-style Py_UNICODE API; please migrate to using PyLong_FromUnicodeObject()."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:105
|
||||
msgid ""
|
||||
"Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:"
|
||||
"func:`PyLong_FromUnicodeObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:110
|
||||
msgid ""
|
||||
"Convert a sequence of Unicode digits in the string *u* to a Python integer "
|
||||
"value. The Unicode string is first encoded to a byte string using :c:func:"
|
||||
"`PyUnicode_EncodeDecimal` and then converted using :c:func:"
|
||||
"`PyLong_FromString`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:120
|
||||
msgid ""
|
||||
"Create a Python integer from the pointer *p*. The pointer value can be "
|
||||
"retrieved from the resulting value using :c:func:`PyLong_AsVoidPtr`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:131 ../Doc/c-api/long.rst:141
|
||||
msgid ""
|
||||
"Return a C :c:type:`long` representation of *obj*. If *obj* is not an "
|
||||
"instance of :c:type:`PyLongObject`, first call its :meth:`__int__` method "
|
||||
"(if present) to convert it to a :c:type:`PyLongObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:135 ../Doc/c-api/long.rst:160
|
||||
msgid ""
|
||||
"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:"
|
||||
"type:`long`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:145
|
||||
msgid ""
|
||||
"If the value of *obj* is greater than :const:`LONG_MAX` or less than :const:"
|
||||
"`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return "
|
||||
"``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception "
|
||||
"occurs set *\\*overflow* to ``0`` and return ``-1`` as usual."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:156 ../Doc/c-api/long.rst:166
|
||||
msgid ""
|
||||
"Return a C :c:type:`long long` representation of *obj*. If *obj* is not an "
|
||||
"instance of :c:type:`PyLongObject`, first call its :meth:`__int__` method "
|
||||
"(if present) to convert it to a :c:type:`PyLongObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:170
|
||||
msgid ""
|
||||
"If the value of *obj* is greater than :const:`PY_LLONG_MAX` or less than :"
|
||||
"const:`PY_LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, "
|
||||
"and return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other "
|
||||
"exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:184
|
||||
msgid ""
|
||||
"Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must "
|
||||
"be an instance of :c:type:`PyLongObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:187
|
||||
msgid ""
|
||||
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
|
||||
"type:`Py_ssize_t`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:197
|
||||
msgid ""
|
||||
"Return a C :c:type:`unsigned long` representation of *pylong*. *pylong* "
|
||||
"must be an instance of :c:type:`PyLongObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:200
|
||||
msgid ""
|
||||
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
|
||||
"type:`unsigned long`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:206
|
||||
msgid ""
|
||||
"Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be an "
|
||||
"instance of :c:type:`PyLongObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:209
|
||||
msgid ""
|
||||
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
|
||||
"type:`size_t`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:218
|
||||
msgid ""
|
||||
"Return a C :c:type:`unsigned long long` representation of *pylong*. "
|
||||
"*pylong* must be an instance of :c:type:`PyLongObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:221
|
||||
msgid ""
|
||||
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :"
|
||||
"c:type:`unsigned long long`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:224
|
||||
msgid ""
|
||||
"A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:230
|
||||
msgid ""
|
||||
"Return a C :c:type:`unsigned long` representation of *obj*. If *obj* is not "
|
||||
"an instance of :c:type:`PyLongObject`, first call its :meth:`__int__` method "
|
||||
"(if present) to convert it to a :c:type:`PyLongObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:234
|
||||
msgid ""
|
||||
"If the value of *obj* is out of range for an :c:type:`unsigned long`, return "
|
||||
"the reduction of that value modulo :const:`ULONG_MAX + 1`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:240
|
||||
msgid ""
|
||||
"Return a C :c:type:`unsigned long long` representation of *obj*. If *obj* "
|
||||
"is not an instance of :c:type:`PyLongObject`, first call its :meth:`__int__` "
|
||||
"method (if present) to convert it to a :c:type:`PyLongObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:244
|
||||
msgid ""
|
||||
"If the value of *obj* is out of range for an :c:type:`unsigned long long`, "
|
||||
"return the reduction of that value modulo :const:`PY_ULLONG_MAX + 1`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:250
|
||||
msgid ""
|
||||
"Return a C :c:type:`double` representation of *pylong*. *pylong* must be an "
|
||||
"instance of :c:type:`PyLongObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:253
|
||||
msgid ""
|
||||
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
|
||||
"type:`double`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/long.rst:259
|
||||
msgid ""
|
||||
"Convert a Python integer *pylong* to a C :c:type:`void` pointer. If *pylong* "
|
||||
"cannot be converted, an :exc:`OverflowError` will be raised. This is only "
|
||||
"assured to produce a usable :c:type:`void` pointer for values created with :"
|
||||
"c:func:`PyLong_FromVoidPtr`."
|
||||
msgstr ""
|
|
@ -0,0 +1,84 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/mapping.rst:6
|
||||
msgid "Mapping Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/mapping.rst:11
|
||||
msgid ""
|
||||
"Return ``1`` if the object provides mapping protocol, and ``0`` otherwise. "
|
||||
"This function always succeeds."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/mapping.rst:20
|
||||
msgid ""
|
||||
"Returns the number of keys in object *o* on success, and ``-1`` on failure. "
|
||||
"For objects that do not provide mapping protocol, this is equivalent to the "
|
||||
"Python expression ``len(o)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/mapping.rst:27 ../Doc/c-api/mapping.rst:33
|
||||
msgid ""
|
||||
"Remove the mapping for object *key* from the object *o*. Return ``-1`` on "
|
||||
"failure. This is equivalent to the Python statement ``del o[key]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/mapping.rst:39
|
||||
msgid ""
|
||||
"On success, return ``1`` if the mapping object has the key *key* and ``0`` "
|
||||
"otherwise. This is equivalent to the Python expression ``key in o``. This "
|
||||
"function always succeeds."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/mapping.rst:46
|
||||
msgid ""
|
||||
"Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. "
|
||||
"This is equivalent to the Python expression ``key in o``. This function "
|
||||
"always succeeds."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/mapping.rst:53
|
||||
msgid ""
|
||||
"On success, return a list or tuple of the keys in object *o*. On failure, "
|
||||
"return *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/mapping.rst:59
|
||||
msgid ""
|
||||
"On success, return a list or tuple of the values in object *o*. On failure, "
|
||||
"return *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/mapping.rst:65
|
||||
msgid ""
|
||||
"On success, return a list or tuple of the items in object *o*, where each "
|
||||
"item is a tuple containing a key-value pair. On failure, return *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/mapping.rst:71
|
||||
msgid ""
|
||||
"Return element of *o* corresponding to the object *key* or *NULL* on "
|
||||
"failure. This is the equivalent of the Python expression ``o[key]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/mapping.rst:77
|
||||
msgid ""
|
||||
"Map the object *key* to the value *v* in object *o*. Returns ``-1`` on "
|
||||
"failure. This is the equivalent of the Python statement ``o[key] = v``."
|
||||
msgstr ""
|
|
@ -0,0 +1,122 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:6
|
||||
msgid "Data marshalling support"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:8
|
||||
msgid ""
|
||||
"These routines allow C code to work with serialized objects using the same "
|
||||
"data format as the :mod:`marshal` module. There are functions to write data "
|
||||
"into the serialization format, and additional functions that can be used to "
|
||||
"read the data back. Files used to store marshalled data must be opened in "
|
||||
"binary mode."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:14
|
||||
msgid "Numeric values are stored with the least significant byte first."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:16
|
||||
msgid ""
|
||||
"The module supports two versions of the data format: version 0 is the "
|
||||
"historical version, version 1 shares interned strings in the file, and upon "
|
||||
"unmarshalling. Version 2 uses a binary format for floating point numbers. "
|
||||
"*Py_MARSHAL_VERSION* indicates the current file format (currently 2)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:24
|
||||
msgid ""
|
||||
"Marshal a :c:type:`long` integer, *value*, to *file*. This will only write "
|
||||
"the least-significant 32 bits of *value*; regardless of the size of the "
|
||||
"native :c:type:`long` type. *version* indicates the file format."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:31
|
||||
msgid ""
|
||||
"Marshal a Python object, *value*, to *file*. *version* indicates the file "
|
||||
"format."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:37
|
||||
msgid ""
|
||||
"Return a string object containing the marshalled representation of *value*. "
|
||||
"*version* indicates the file format."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:41
|
||||
msgid "The following functions allow marshalled values to be read back in."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:43
|
||||
msgid ""
|
||||
"XXX What about error detection? It appears that reading past the end of the "
|
||||
"file will always result in a negative numeric value (where that's relevant), "
|
||||
"but it's not clear that negative values won't be handled properly when "
|
||||
"there's no error. What's the right way to tell? Should only non-negative "
|
||||
"values be written using these routines?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:52
|
||||
msgid ""
|
||||
"Return a C :c:type:`long` from the data stream in a :c:type:`FILE\\*` opened "
|
||||
"for reading. Only a 32-bit value can be read in using this function, "
|
||||
"regardless of the native size of :c:type:`long`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:56 ../Doc/c-api/marshal.rst:65
|
||||
msgid "On error, raise an exception and return ``-1``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:61
|
||||
msgid ""
|
||||
"Return a C :c:type:`short` from the data stream in a :c:type:`FILE\\*` "
|
||||
"opened for reading. Only a 16-bit value can be read in using this function, "
|
||||
"regardless of the native size of :c:type:`short`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:70
|
||||
msgid ""
|
||||
"Return a Python object from the data stream in a :c:type:`FILE\\*` opened "
|
||||
"for reading."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:73 ../Doc/c-api/marshal.rst:87
|
||||
#: ../Doc/c-api/marshal.rst:96
|
||||
msgid ""
|
||||
"On error, sets the appropriate exception (:exc:`EOFError` or :exc:"
|
||||
"`TypeError`) and returns *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:79
|
||||
msgid ""
|
||||
"Return a Python object from the data stream in a :c:type:`FILE\\*` opened "
|
||||
"for reading. Unlike :c:func:`PyMarshal_ReadObjectFromFile`, this function "
|
||||
"assumes that no further objects will be read from the file, allowing it to "
|
||||
"aggressively load file data into memory so that the de-serialization can "
|
||||
"operate from data in memory rather than reading a byte at a time from the "
|
||||
"file. Only use these variant if you are certain that you won't be reading "
|
||||
"anything else from the file."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/marshal.rst:93
|
||||
msgid ""
|
||||
"Return a Python object from the data stream in a character buffer containing "
|
||||
"*len* bytes pointed to by *string*."
|
||||
msgstr ""
|
|
@ -0,0 +1,638 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/memory.rst:8
|
||||
msgid "Memory Management"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:17
|
||||
msgid "Overview"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:19
|
||||
msgid ""
|
||||
"Memory management in Python involves a private heap containing all Python "
|
||||
"objects and data structures. The management of this private heap is ensured "
|
||||
"internally by the *Python memory manager*. The Python memory manager has "
|
||||
"different components which deal with various dynamic storage management "
|
||||
"aspects, like sharing, segmentation, preallocation or caching."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:25
|
||||
msgid ""
|
||||
"At the lowest level, a raw memory allocator ensures that there is enough "
|
||||
"room in the private heap for storing all Python-related data by interacting "
|
||||
"with the memory manager of the operating system. On top of the raw memory "
|
||||
"allocator, several object-specific allocators operate on the same heap and "
|
||||
"implement distinct memory management policies adapted to the peculiarities "
|
||||
"of every object type. For example, integer objects are managed differently "
|
||||
"within the heap than strings, tuples or dictionaries because integers imply "
|
||||
"different storage requirements and speed/space tradeoffs. The Python memory "
|
||||
"manager thus delegates some of the work to the object-specific allocators, "
|
||||
"but ensures that the latter operate within the bounds of the private heap."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:36
|
||||
msgid ""
|
||||
"It is important to understand that the management of the Python heap is "
|
||||
"performed by the interpreter itself and that the user has no control over "
|
||||
"it, even if she regularly manipulates object pointers to memory blocks "
|
||||
"inside that heap. The allocation of heap space for Python objects and other "
|
||||
"internal buffers is performed on demand by the Python memory manager through "
|
||||
"the Python/C API functions listed in this document."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:49
|
||||
msgid ""
|
||||
"To avoid memory corruption, extension writers should never try to operate on "
|
||||
"Python objects with the functions exported by the C library: :c:func:"
|
||||
"`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`. This will "
|
||||
"result in mixed calls between the C allocator and the Python memory manager "
|
||||
"with fatal consequences, because they implement different algorithms and "
|
||||
"operate on different heaps. However, one may safely allocate and release "
|
||||
"memory blocks with the C library allocator for individual purposes, as shown "
|
||||
"in the following example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:68
|
||||
msgid ""
|
||||
"In this example, the memory request for the I/O buffer is handled by the C "
|
||||
"library allocator. The Python memory manager is involved only in the "
|
||||
"allocation of the string object returned as a result."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:72
|
||||
msgid ""
|
||||
"In most situations, however, it is recommended to allocate memory from the "
|
||||
"Python heap specifically because the latter is under control of the Python "
|
||||
"memory manager. For example, this is required when the interpreter is "
|
||||
"extended with new object types written in C. Another reason for using the "
|
||||
"Python heap is the desire to *inform* the Python memory manager about the "
|
||||
"memory needs of the extension module. Even when the requested memory is used "
|
||||
"exclusively for internal, highly-specific purposes, delegating all memory "
|
||||
"requests to the Python memory manager causes the interpreter to have a more "
|
||||
"accurate image of its memory footprint as a whole. Consequently, under "
|
||||
"certain circumstances, the Python memory manager may or may not trigger "
|
||||
"appropriate actions, like garbage collection, memory compaction or other "
|
||||
"preventive procedures. Note that by using the C library allocator as shown "
|
||||
"in the previous example, the allocated memory for the I/O buffer escapes "
|
||||
"completely the Python memory manager."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:88
|
||||
msgid ""
|
||||
"The :envvar:`PYTHONMALLOC` environment variable can be used to configure the "
|
||||
"memory allocators used by Python."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:91
|
||||
msgid ""
|
||||
"The :envvar:`PYTHONMALLOCSTATS` environment variable can be used to print "
|
||||
"statistics of the :ref:`pymalloc memory allocator <pymalloc>` every time a "
|
||||
"new pymalloc object arena is created, and on shutdown."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:97
|
||||
msgid "Raw Memory Interface"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:99
|
||||
msgid ""
|
||||
"The following function sets are wrappers to the system allocator. These "
|
||||
"functions are thread-safe, the :term:`GIL <global interpreter lock>` does "
|
||||
"not need to be held."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:103
|
||||
msgid ""
|
||||
"The default raw memory block allocator uses the following functions: :c:func:"
|
||||
"`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`; call "
|
||||
"``malloc(1)`` (or ``calloc(1, 1)``) when requesting zero bytes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:111 ../Doc/c-api/memory.rst:181
|
||||
msgid ""
|
||||
"Allocates *n* bytes and returns a pointer of type :c:type:`void\\*` to the "
|
||||
"allocated memory, or *NULL* if the request fails."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:114
|
||||
msgid ""
|
||||
"Requesting zero bytes returns a distinct non-*NULL* pointer if possible, as "
|
||||
"if ``PyMem_RawMalloc(1)`` had been called instead. The memory will not have "
|
||||
"been initialized in any way."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:121 ../Doc/c-api/memory.rst:191
|
||||
msgid ""
|
||||
"Allocates *nelem* elements each whose size in bytes is *elsize* and returns "
|
||||
"a pointer of type :c:type:`void\\*` to the allocated memory, or *NULL* if "
|
||||
"the request fails. The memory is initialized to zeros."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:125
|
||||
msgid ""
|
||||
"Requesting zero elements or elements of size zero bytes returns a distinct "
|
||||
"non-*NULL* pointer if possible, as if ``PyMem_RawCalloc(1, 1)`` had been "
|
||||
"called instead."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:134 ../Doc/c-api/memory.rst:204
|
||||
msgid ""
|
||||
"Resizes the memory block pointed to by *p* to *n* bytes. The contents will "
|
||||
"be unchanged to the minimum of the old and the new sizes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:137
|
||||
msgid ""
|
||||
"If *p* is *NULL*, the call is equivalent to ``PyMem_RawMalloc(n)``; else if "
|
||||
"*n* is equal to zero, the memory block is resized but is not freed, and the "
|
||||
"returned pointer is non-*NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:141
|
||||
msgid ""
|
||||
"Unless *p* is *NULL*, it must have been returned by a previous call to :c:"
|
||||
"func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:func:"
|
||||
"`PyMem_RawCalloc`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:145
|
||||
msgid ""
|
||||
"If the request fails, :c:func:`PyMem_RawRealloc` returns *NULL* and *p* "
|
||||
"remains a valid pointer to the previous memory area."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:151
|
||||
msgid ""
|
||||
"Frees the memory block pointed to by *p*, which must have been returned by a "
|
||||
"previous call to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or :c:"
|
||||
"func:`PyMem_RawCalloc`. Otherwise, or if ``PyMem_Free(p)`` has been called "
|
||||
"before, undefined behavior occurs."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:156 ../Doc/c-api/memory.rst:225
|
||||
msgid "If *p* is *NULL*, no operation is performed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:162
|
||||
msgid "Memory Interface"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:164
|
||||
msgid ""
|
||||
"The following function sets, modeled after the ANSI C standard, but "
|
||||
"specifying behavior when requesting zero bytes, are available for allocating "
|
||||
"and releasing memory from the Python heap."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:168
|
||||
msgid ""
|
||||
"By default, these functions use :ref:`pymalloc memory allocator <pymalloc>`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:172
|
||||
msgid ""
|
||||
"The :term:`GIL <global interpreter lock>` must be held when using these "
|
||||
"functions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:177
|
||||
msgid ""
|
||||
"The default allocator is now pymalloc instead of system :c:func:`malloc`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:184
|
||||
msgid ""
|
||||
"Requesting zero bytes returns a distinct non-*NULL* pointer if possible, as "
|
||||
"if ``PyMem_Malloc(1)`` had been called instead. The memory will not have "
|
||||
"been initialized in any way."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:195
|
||||
msgid ""
|
||||
"Requesting zero elements or elements of size zero bytes returns a distinct "
|
||||
"non-*NULL* pointer if possible, as if ``PyMem_Calloc(1, 1)`` had been called "
|
||||
"instead."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:207
|
||||
msgid ""
|
||||
"If *p* is *NULL*, the call is equivalent to ``PyMem_Malloc(n)``; else if *n* "
|
||||
"is equal to zero, the memory block is resized but is not freed, and the "
|
||||
"returned pointer is non-*NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:211
|
||||
msgid ""
|
||||
"Unless *p* is *NULL*, it must have been returned by a previous call to :c:"
|
||||
"func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:214
|
||||
msgid ""
|
||||
"If the request fails, :c:func:`PyMem_Realloc` returns *NULL* and *p* remains "
|
||||
"a valid pointer to the previous memory area."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:220
|
||||
msgid ""
|
||||
"Frees the memory block pointed to by *p*, which must have been returned by a "
|
||||
"previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:"
|
||||
"`PyMem_Calloc`. Otherwise, or if ``PyMem_Free(p)`` has been called before, "
|
||||
"undefined behavior occurs."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:227
|
||||
msgid ""
|
||||
"The following type-oriented macros are provided for convenience. Note that "
|
||||
"*TYPE* refers to any C type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:233
|
||||
msgid ""
|
||||
"Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes "
|
||||
"of memory. Returns a pointer cast to :c:type:`TYPE\\*`. The memory will "
|
||||
"not have been initialized in any way."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:240
|
||||
msgid ""
|
||||
"Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * "
|
||||
"sizeof(TYPE))`` bytes. Returns a pointer cast to :c:type:`TYPE\\*`. On "
|
||||
"return, *p* will be a pointer to the new memory area, or *NULL* in the event "
|
||||
"of failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:245
|
||||
msgid ""
|
||||
"This is a C preprocessor macro; *p* is always reassigned. Save the original "
|
||||
"value of *p* to avoid losing memory when handling errors."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:251
|
||||
msgid "Same as :c:func:`PyMem_Free`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:253
|
||||
msgid ""
|
||||
"In addition, the following macro sets are provided for calling the Python "
|
||||
"memory allocator directly, without involving the C API functions listed "
|
||||
"above. However, note that their use does not preserve binary compatibility "
|
||||
"across Python versions and is therefore deprecated in extension modules."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:258
|
||||
msgid "``PyMem_MALLOC(size)``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:259
|
||||
msgid "``PyMem_NEW(type, size)``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:260
|
||||
msgid "``PyMem_REALLOC(ptr, size)``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:261
|
||||
msgid "``PyMem_RESIZE(ptr, type, size)``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:262
|
||||
msgid "``PyMem_FREE(ptr)``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:263
|
||||
msgid "``PyMem_DEL(ptr)``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:267
|
||||
msgid "Customize Memory Allocators"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:273
|
||||
msgid ""
|
||||
"Structure used to describe a memory block allocator. The structure has four "
|
||||
"fields:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:277 ../Doc/c-api/memory.rst:414
|
||||
msgid "Field"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:277 ../Doc/c-api/memory.rst:414
|
||||
msgid "Meaning"
|
||||
msgstr "Signification"
|
||||
|
||||
#: ../Doc/c-api/memory.rst:279 ../Doc/c-api/memory.rst:416
|
||||
msgid "``void *ctx``"
|
||||
msgstr "``void *ctx``"
|
||||
|
||||
#: ../Doc/c-api/memory.rst:279 ../Doc/c-api/memory.rst:416
|
||||
msgid "user context passed as first argument"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:281
|
||||
msgid "``void* malloc(void *ctx, size_t size)``"
|
||||
msgstr "``void* malloc(void *ctx, size_t size)``"
|
||||
|
||||
#: ../Doc/c-api/memory.rst:281
|
||||
msgid "allocate a memory block"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:283
|
||||
msgid "``void* calloc(void *ctx, size_t nelem, size_t elsize)``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:283
|
||||
msgid "allocate a memory block initialized with zeros"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:286
|
||||
msgid "``void* realloc(void *ctx, void *ptr, size_t new_size)``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:286
|
||||
msgid "allocate or resize a memory block"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:288
|
||||
msgid "``void free(void *ctx, void *ptr)``"
|
||||
msgstr "``void free(void *ctx, void *ptr)``"
|
||||
|
||||
#: ../Doc/c-api/memory.rst:288
|
||||
msgid "free a memory block"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:291
|
||||
msgid ""
|
||||
"The :c:type:`PyMemAllocator` structure was renamed to :c:type:"
|
||||
"`PyMemAllocatorEx` and a new ``calloc`` field was added."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:298
|
||||
msgid "Enum used to identify an allocator domain. Domains:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:302 ../Doc/c-api/memory.rst:311
|
||||
#: ../Doc/c-api/memory.rst:320
|
||||
msgid "Functions:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:304
|
||||
msgid ":c:func:`PyMem_RawMalloc`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:305
|
||||
msgid ":c:func:`PyMem_RawRealloc`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:306
|
||||
msgid ":c:func:`PyMem_RawCalloc`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:307
|
||||
msgid ":c:func:`PyMem_RawFree`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:313
|
||||
msgid ":c:func:`PyMem_Malloc`,"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:314
|
||||
msgid ":c:func:`PyMem_Realloc`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:315
|
||||
msgid ":c:func:`PyMem_Calloc`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:316
|
||||
msgid ":c:func:`PyMem_Free`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:322
|
||||
msgid ":c:func:`PyObject_Malloc`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:323
|
||||
msgid ":c:func:`PyObject_Realloc`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:324
|
||||
msgid ":c:func:`PyObject_Calloc`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:325
|
||||
msgid ":c:func:`PyObject_Free`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:329
|
||||
msgid "Get the memory block allocator of the specified domain."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:334
|
||||
msgid "Set the memory block allocator of the specified domain."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:336
|
||||
msgid ""
|
||||
"The new allocator must return a distinct non-NULL pointer when requesting "
|
||||
"zero bytes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:339
|
||||
msgid ""
|
||||
"For the :c:data:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-"
|
||||
"safe: the :term:`GIL <global interpreter lock>` is not held when the "
|
||||
"allocator is called."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:343
|
||||
msgid ""
|
||||
"If the new allocator is not a hook (does not call the previous allocator), "
|
||||
"the :c:func:`PyMem_SetupDebugHooks` function must be called to reinstall the "
|
||||
"debug hooks on top on the new allocator."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:350
|
||||
msgid "Setup hooks to detect bugs in the Python memory allocator functions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:352
|
||||
msgid ""
|
||||
"Newly allocated memory is filled with the byte ``0xCB``, freed memory is "
|
||||
"filled with the byte ``0xDB``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:355
|
||||
msgid "Runtime checks:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:357
|
||||
msgid ""
|
||||
"Detect API violations, ex: :c:func:`PyObject_Free` called on a buffer "
|
||||
"allocated by :c:func:`PyMem_Malloc`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:359
|
||||
msgid "Detect write before the start of the buffer (buffer underflow)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:360
|
||||
msgid "Detect write after the end of the buffer (buffer overflow)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:361
|
||||
msgid ""
|
||||
"Check that the :term:`GIL <global interpreter lock>` is held when allocator "
|
||||
"functions of :c:data:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) and :"
|
||||
"c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are called"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:366
|
||||
msgid ""
|
||||
"On error, the debug hooks use the :mod:`tracemalloc` module to get the "
|
||||
"traceback where a memory block was allocated. The traceback is only "
|
||||
"displayed if :mod:`tracemalloc` is tracing Python memory allocations and the "
|
||||
"memory block was traced."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:371
|
||||
msgid ""
|
||||
"These hooks are installed by default if Python is compiled in debug mode. "
|
||||
"The :envvar:`PYTHONMALLOC` environment variable can be used to install debug "
|
||||
"hooks on a Python compiled in release mode."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:375
|
||||
msgid ""
|
||||
"This function now also works on Python compiled in release mode. On error, "
|
||||
"the debug hooks now use :mod:`tracemalloc` to get the traceback where a "
|
||||
"memory block was allocated. The debug hooks now also check if the GIL is "
|
||||
"held when functions of :c:data:`PYMEM_DOMAIN_OBJ` and :c:data:"
|
||||
"`PYMEM_DOMAIN_MEM` domains are called."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:386
|
||||
msgid "The pymalloc allocator"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:388
|
||||
msgid ""
|
||||
"Python has a *pymalloc* allocator optimized for small objects (smaller or "
|
||||
"equal to 512 bytes) with a short lifetime. It uses memory mappings called "
|
||||
"\"arenas\" with a fixed size of 256 KB. It falls back to :c:func:"
|
||||
"`PyMem_RawMalloc` and :c:func:`PyMem_RawRealloc` for allocations larger than "
|
||||
"512 bytes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:393
|
||||
msgid ""
|
||||
"*pymalloc* is the default allocator of the :c:data:`PYMEM_DOMAIN_MEM` (ex: :"
|
||||
"c:func:`PyObject_Malloc`) and :c:data:`PYMEM_DOMAIN_OBJ` (ex: :c:func:"
|
||||
"`PyObject_Malloc`) domains."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:397
|
||||
msgid "The arena allocator uses the following functions:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:399
|
||||
msgid ":c:func:`VirtualAlloc` and :c:func:`VirtualFree` on Windows,"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:400
|
||||
msgid ":c:func:`mmap` and :c:func:`munmap` if available,"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:401
|
||||
msgid ":c:func:`malloc` and :c:func:`free` otherwise."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:404
|
||||
msgid "Customize pymalloc Arena Allocator"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:410
|
||||
msgid ""
|
||||
"Structure used to describe an arena allocator. The structure has three "
|
||||
"fields:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:418
|
||||
msgid "``void* alloc(void *ctx, size_t size)``"
|
||||
msgstr "``void* alloc(void *ctx, size_t size)``"
|
||||
|
||||
#: ../Doc/c-api/memory.rst:418
|
||||
msgid "allocate an arena of size bytes"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:420
|
||||
msgid "``void free(void *ctx, size_t size, void *ptr)``"
|
||||
msgstr "``void free(void *ctx, size_t size, void *ptr)``"
|
||||
|
||||
#: ../Doc/c-api/memory.rst:420
|
||||
msgid "free an arena"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:425
|
||||
msgid "Get the arena allocator."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:429
|
||||
msgid "Set the arena allocator."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:435
|
||||
msgid "Examples"
|
||||
msgstr "Exemples"
|
||||
|
||||
#: ../Doc/c-api/memory.rst:437
|
||||
msgid ""
|
||||
"Here is the example from section :ref:`memoryoverview`, rewritten so that "
|
||||
"the I/O buffer is allocated from the Python heap by using the first function "
|
||||
"set::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:450
|
||||
msgid "The same code using the type-oriented function set::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:462
|
||||
msgid ""
|
||||
"Note that in the two examples above, the buffer is always manipulated via "
|
||||
"functions belonging to the same set. Indeed, it is required to use the same "
|
||||
"memory API family for a given memory block, so that the risk of mixing "
|
||||
"different allocators is reduced to a minimum. The following code sequence "
|
||||
"contains two errors, one of which is labeled as *fatal* because it mixes two "
|
||||
"different allocators operating on different heaps. ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:477
|
||||
msgid ""
|
||||
"In addition to the functions aimed at handling raw memory blocks from the "
|
||||
"Python heap, objects in Python are allocated and released with :c:func:"
|
||||
"`PyObject_New`, :c:func:`PyObject_NewVar` and :c:func:`PyObject_Del`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memory.rst:481
|
||||
msgid ""
|
||||
"These will be explained in the next chapter on defining and implementing new "
|
||||
"object types in C."
|
||||
msgstr ""
|
|
@ -0,0 +1,79 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/memoryview.rst:9
|
||||
msgid "MemoryView objects"
|
||||
msgstr "Objets de type MemoryView"
|
||||
|
||||
#: ../Doc/c-api/memoryview.rst:11
|
||||
msgid ""
|
||||
"A :class:`memoryview` object exposes the C level :ref:`buffer interface "
|
||||
"<bufferobjects>` as a Python object which can then be passed around like any "
|
||||
"other object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memoryview.rst:18
|
||||
msgid ""
|
||||
"Create a memoryview object from an object that provides the buffer "
|
||||
"interface. If *obj* supports writable buffer exports, the memoryview object "
|
||||
"will be read/write, otherwise it may be either read-only or read/write at "
|
||||
"the discretion of the exporter."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memoryview.rst:25
|
||||
msgid ""
|
||||
"Create a memoryview object using *mem* as the underlying buffer. *flags* can "
|
||||
"be one of :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memoryview.rst:32
|
||||
msgid ""
|
||||
"Create a memoryview object wrapping the given buffer structure *view*. For "
|
||||
"simple byte buffers, :c:func:`PyMemoryView_FromMemory` is the preferred "
|
||||
"function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memoryview.rst:38
|
||||
msgid ""
|
||||
"Create a memoryview object to a :term:`contiguous` chunk of memory (in "
|
||||
"either 'C' or 'F'ortran *order*) from an object that defines the buffer "
|
||||
"interface. If memory is contiguous, the memoryview object points to the "
|
||||
"original memory. Otherwise, a copy is made and the memoryview points to a "
|
||||
"new bytes object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memoryview.rst:47
|
||||
msgid ""
|
||||
"Return true if the object *obj* is a memoryview object. It is not currently "
|
||||
"allowed to create subclasses of :class:`memoryview`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memoryview.rst:53
|
||||
msgid ""
|
||||
"Return a pointer to the memoryview's private copy of the exporter's buffer. "
|
||||
"*mview* **must** be a memoryview instance; this macro doesn't check its "
|
||||
"type, you must do it yourself or you will risk crashes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/memoryview.rst:59
|
||||
msgid ""
|
||||
"Return either a pointer to the exporting object that the memoryview is based "
|
||||
"on or *NULL* if the memoryview has been created by one of the functions :c:"
|
||||
"func:`PyMemoryView_FromMemory` or :c:func:`PyMemoryView_FromBuffer`. *mview* "
|
||||
"**must** be a memoryview instance."
|
||||
msgstr ""
|
|
@ -0,0 +1,108 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/method.rst:6
|
||||
msgid "Instance Method Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:10
|
||||
msgid ""
|
||||
"An instance method is a wrapper for a :c:data:`PyCFunction` and the new way "
|
||||
"to bind a :c:data:`PyCFunction` to a class object. It replaces the former "
|
||||
"call ``PyMethod_New(func, NULL, class)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:17
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python instance "
|
||||
"method type. It is not exposed to Python programs."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:23
|
||||
msgid ""
|
||||
"Return true if *o* is an instance method object (has type :c:data:"
|
||||
"`PyInstanceMethod_Type`). The parameter must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:29
|
||||
msgid ""
|
||||
"Return a new instance method object, with *func* being any callable object "
|
||||
"*func* is the function that will be called when the instance method is "
|
||||
"called."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:36
|
||||
msgid "Return the function object associated with the instance method *im*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:41
|
||||
msgid ""
|
||||
"Macro version of :c:func:`PyInstanceMethod_Function` which avoids error "
|
||||
"checking."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:47
|
||||
msgid "Method Objects"
|
||||
msgstr "Les objets méthode"
|
||||
|
||||
#: ../Doc/c-api/method.rst:51
|
||||
msgid ""
|
||||
"Methods are bound function objects. Methods are always bound to an instance "
|
||||
"of a user-defined class. Unbound methods (methods bound to a class object) "
|
||||
"are no longer available."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:60
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python method type. "
|
||||
"This is exposed to Python programs as ``types.MethodType``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:66
|
||||
msgid ""
|
||||
"Return true if *o* is a method object (has type :c:data:`PyMethod_Type`). "
|
||||
"The parameter must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:72
|
||||
msgid ""
|
||||
"Return a new method object, with *func* being any callable object and *self* "
|
||||
"the instance the method should be bound. *func* is the function that will be "
|
||||
"called when the method is called. *self* must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:79
|
||||
msgid "Return the function object associated with the method *meth*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:84
|
||||
msgid ""
|
||||
"Macro version of :c:func:`PyMethod_Function` which avoids error checking."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:89
|
||||
msgid "Return the instance associated with the method *meth*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:94
|
||||
msgid "Macro version of :c:func:`PyMethod_Self` which avoids error checking."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/method.rst:99
|
||||
msgid "Clear the free list. Return the total number of freed items."
|
||||
msgstr ""
|
|
@ -0,0 +1,545 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/module.rst:6
|
||||
msgid "Module Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:15
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python module type. "
|
||||
"This is exposed to Python programs as ``types.ModuleType``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:21
|
||||
msgid "Return true if *p* is a module object, or a subtype of a module object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:26
|
||||
msgid ""
|
||||
"Return true if *p* is a module object, but not a subtype of :c:data:"
|
||||
"`PyModule_Type`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:39
|
||||
msgid ""
|
||||
"Return a new module object with the :attr:`__name__` attribute set to "
|
||||
"*name*. The module's :attr:`__name__`, :attr:`__doc__`, :attr:`__package__`, "
|
||||
"and :attr:`__loader__` attributes are filled in (all but :attr:`__name__` "
|
||||
"are set to ``None``); the caller is responsible for providing a :attr:"
|
||||
"`__file__` attribute."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:47
|
||||
msgid ":attr:`__package__` and :attr:`__loader__` are set to ``None``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:53
|
||||
msgid ""
|
||||
"Similar to :c:func:`PyImport_NewObject`, but the name is a UTF-8 encoded "
|
||||
"string instead of a Unicode object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:61
|
||||
msgid ""
|
||||
"Return the dictionary object that implements *module*'s namespace; this "
|
||||
"object is the same as the :attr:`~object.__dict__` attribute of the module "
|
||||
"object. If *module* is not a module object (or a subtype of a module "
|
||||
"object), :exc:`SystemError` is raised and *NULL* is returned."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:66
|
||||
msgid ""
|
||||
"It is recommended extensions use other :c:func:`PyModule_\\*` and :c:func:"
|
||||
"`PyObject_\\*` functions rather than directly manipulate a module's :attr:"
|
||||
"`~object.__dict__`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:77
|
||||
msgid ""
|
||||
"Return *module*'s :attr:`__name__` value. If the module does not provide "
|
||||
"one, or if it is not a string, :exc:`SystemError` is raised and *NULL* is "
|
||||
"returned."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:85
|
||||
msgid ""
|
||||
"Similar to :c:func:`PyModule_GetNameObject` but return the name encoded to "
|
||||
"``'utf-8'``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:90
|
||||
msgid ""
|
||||
"Return the \"state\" of the module, that is, a pointer to the block of "
|
||||
"memory allocated at module creation time, or *NULL*. See :c:member:"
|
||||
"`PyModuleDef.m_size`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:97
|
||||
msgid ""
|
||||
"Return a pointer to the :c:type:`PyModuleDef` struct from which the module "
|
||||
"was created, or *NULL* if the module wasn't created from a definition."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:107
|
||||
msgid ""
|
||||
"Return the name of the file from which *module* was loaded using *module*'s :"
|
||||
"attr:`__file__` attribute. If this is not defined, or if it is not a "
|
||||
"unicode string, raise :exc:`SystemError` and return *NULL*; otherwise return "
|
||||
"a reference to a Unicode object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:117
|
||||
msgid ""
|
||||
"Similar to :c:func:`PyModule_GetFilenameObject` but return the filename "
|
||||
"encoded to 'utf-8'."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:120
|
||||
msgid ""
|
||||
":c:func:`PyModule_GetFilename` raises :c:type:`UnicodeEncodeError` on "
|
||||
"unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:128
|
||||
msgid "Initializing C modules"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:130
|
||||
msgid ""
|
||||
"Modules objects are usually created from extension modules (shared libraries "
|
||||
"which export an initialization function), or compiled-in modules (where the "
|
||||
"initialization function is added using :c:func:`PyImport_AppendInittab`). "
|
||||
"See :ref:`building` or :ref:`extending-with-embedding` for details."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:135
|
||||
msgid ""
|
||||
"The initialization function can either pass a module definition instance to :"
|
||||
"c:func:`PyModule_Create`, and return the resulting module object, or request "
|
||||
"\"multi-phase initialization\" by returning the definition struct itself."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:141
|
||||
msgid ""
|
||||
"The module definition struct, which holds all information needed to create a "
|
||||
"module object. There is usually only one statically initialized variable of "
|
||||
"this type for each module."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:147
|
||||
msgid "Always initialize this member to :const:`PyModuleDef_HEAD_INIT`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:151
|
||||
msgid "Name for the new module."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:155
|
||||
msgid ""
|
||||
"Docstring for the module; usually a docstring variable created with :c:func:"
|
||||
"`PyDoc_STRVAR` is used."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:160
|
||||
msgid ""
|
||||
"Module state may be kept in a per-module memory area that can be retrieved "
|
||||
"with :c:func:`PyModule_GetState`, rather than in static globals. This makes "
|
||||
"modules safe for use in multiple sub-interpreters."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:164
|
||||
msgid ""
|
||||
"This memory area is allocated based on *m_size* on module creation, and "
|
||||
"freed when the module object is deallocated, after the :c:member:`m_free` "
|
||||
"function has been called, if present."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:168
|
||||
msgid ""
|
||||
"Setting ``m_size`` to ``-1`` means that the module does not support sub-"
|
||||
"interpreters, because it has global state."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:171
|
||||
msgid ""
|
||||
"Setting it to a non-negative value means that the module can be re-"
|
||||
"initialized and specifies the additional amount of memory it requires for "
|
||||
"its state. Non-negative ``m_size`` is required for multi-phase "
|
||||
"initialization."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:176
|
||||
msgid "See :PEP:`3121` for more details."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:180
|
||||
msgid ""
|
||||
"A pointer to a table of module-level functions, described by :c:type:"
|
||||
"`PyMethodDef` values. Can be *NULL* if no functions are present."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:185
|
||||
msgid ""
|
||||
"An array of slot definitions for multi-phase initialization, terminated by a "
|
||||
"``{0, NULL}`` entry. When using single-phase initialization, *m_slots* must "
|
||||
"be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:191
|
||||
msgid ""
|
||||
"Prior to version 3.5, this member was always set to *NULL*, and was defined "
|
||||
"as:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:198
|
||||
msgid ""
|
||||
"A traversal function to call during GC traversal of the module object, or "
|
||||
"*NULL* if not needed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:203
|
||||
msgid ""
|
||||
"A clear function to call during GC clearing of the module object, or *NULL* "
|
||||
"if not needed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:208
|
||||
msgid ""
|
||||
"A function to call during deallocation of the module object, or *NULL* if "
|
||||
"not needed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:212
|
||||
msgid "Single-phase initialization"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:214
|
||||
msgid ""
|
||||
"The module initialization function may create and return the module object "
|
||||
"directly. This is referred to as \"single-phase initialization\", and uses "
|
||||
"one of the following two module creation functions:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:220
|
||||
msgid ""
|
||||
"Create a new module object, given the definition in *def*. This behaves "
|
||||
"like :c:func:`PyModule_Create2` with *module_api_version* set to :const:"
|
||||
"`PYTHON_API_VERSION`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:227
|
||||
msgid ""
|
||||
"Create a new module object, given the definition in *def*, assuming the API "
|
||||
"version *module_api_version*. If that version does not match the version of "
|
||||
"the running interpreter, a :exc:`RuntimeWarning` is emitted."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:233
|
||||
msgid ""
|
||||
"Most uses of this function should be using :c:func:`PyModule_Create` "
|
||||
"instead; only use this if you are sure you need it."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:236
|
||||
msgid ""
|
||||
"Before it is returned from in the initialization function, the resulting "
|
||||
"module object is typically populated using functions like :c:func:"
|
||||
"`PyModule_AddObject`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:242
|
||||
msgid "Multi-phase initialization"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:244
|
||||
msgid ""
|
||||
"An alternate way to specify extensions is to request \"multi-phase "
|
||||
"initialization\". Extension modules created this way behave more like Python "
|
||||
"modules: the initialization is split between the *creation phase*, when the "
|
||||
"module object is created, and the *execution phase*, when it is populated. "
|
||||
"The distinction is similar to the :py:meth:`__new__` and :py:meth:`__init__` "
|
||||
"methods of classes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:251
|
||||
msgid ""
|
||||
"Unlike modules created using single-phase initialization, these modules are "
|
||||
"not singletons: if the *sys.modules* entry is removed and the module is re-"
|
||||
"imported, a new module object is created, and the old module is subject to "
|
||||
"normal garbage collection -- as with Python modules. By default, multiple "
|
||||
"modules created from the same definition should be independent: changes to "
|
||||
"one should not affect the others. This means that all state should be "
|
||||
"specific to the module object (using e.g. using :c:func:"
|
||||
"`PyModule_GetState`), or its contents (such as the module's :attr:`__dict__` "
|
||||
"or individual classes created with :c:func:`PyType_FromSpec`)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:261
|
||||
msgid ""
|
||||
"All modules created using multi-phase initialization are expected to "
|
||||
"support :ref:`sub-interpreters <sub-interpreter-support>`. Making sure "
|
||||
"multiple modules are independent is typically enough to achieve this."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:265
|
||||
msgid ""
|
||||
"To request multi-phase initialization, the initialization function "
|
||||
"(PyInit_modulename) returns a :c:type:`PyModuleDef` instance with non-empty :"
|
||||
"c:member:`~PyModuleDef.m_slots`. Before it is returned, the ``PyModuleDef`` "
|
||||
"instance must be initialized with the following function:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:272
|
||||
msgid ""
|
||||
"Ensures a module definition is a properly initialized Python object that "
|
||||
"correctly reports its type and reference count."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:275
|
||||
msgid "Returns *def* cast to ``PyObject*``, or *NULL* if an error occurred."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:279
|
||||
msgid ""
|
||||
"The *m_slots* member of the module definition must point to an array of "
|
||||
"``PyModuleDef_Slot`` structures:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:286
|
||||
msgid "A slot ID, chosen from the available values explained below."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:290
|
||||
msgid "Value of the slot, whose meaning depends on the slot ID."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:294
|
||||
msgid "The *m_slots* array must be terminated by a slot with id 0."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:296
|
||||
msgid "The available slot types are:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:300
|
||||
msgid ""
|
||||
"Specifies a function that is called to create the module object itself. The "
|
||||
"*value* pointer of this slot must point to a function of the signature:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:305
|
||||
msgid ""
|
||||
"The function receives a :py:class:`~importlib.machinery.ModuleSpec` "
|
||||
"instance, as defined in :PEP:`451`, and the module definition. It should "
|
||||
"return a new module object, or set an error and return *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:310
|
||||
msgid ""
|
||||
"This function should be kept minimal. In particular, it should not call "
|
||||
"arbitrary Python code, as trying to import the same module again may result "
|
||||
"in an infinite loop."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:314
|
||||
msgid ""
|
||||
"Multiple ``Py_mod_create`` slots may not be specified in one module "
|
||||
"definition."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:317
|
||||
msgid ""
|
||||
"If ``Py_mod_create`` is not specified, the import machinery will create a "
|
||||
"normal module object using :c:func:`PyModule_New`. The name is taken from "
|
||||
"*spec*, not the definition, to allow extension modules to dynamically adjust "
|
||||
"to their place in the module hierarchy and be imported under different names "
|
||||
"through symlinks, all while sharing a single module definition."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:323
|
||||
msgid ""
|
||||
"There is no requirement for the returned object to be an instance of :c:type:"
|
||||
"`PyModule_Type`. Any type can be used, as long as it supports setting and "
|
||||
"getting import-related attributes. However, only ``PyModule_Type`` instances "
|
||||
"may be returned if the ``PyModuleDef`` has non-*NULL* ``m_traverse``, "
|
||||
"``m_clear``, ``m_free``; non-zero ``m_size``; or slots other than "
|
||||
"``Py_mod_create``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:332
|
||||
msgid ""
|
||||
"Specifies a function that is called to *execute* the module. This is "
|
||||
"equivalent to executing the code of a Python module: typically, this "
|
||||
"function adds classes and constants to the module. The signature of the "
|
||||
"function is:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:339
|
||||
msgid ""
|
||||
"If multiple ``Py_mod_exec`` slots are specified, they are processed in the "
|
||||
"order they appear in the *m_slots* array."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:342
|
||||
msgid "See :PEP:`489` for more details on multi-phase initialization."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:345
|
||||
msgid "Low-level module creation functions"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:347
|
||||
msgid ""
|
||||
"The following functions are called under the hood when using multi-phase "
|
||||
"initialization. They can be used directly, for example when creating module "
|
||||
"objects dynamically. Note that both ``PyModule_FromDefAndSpec`` and "
|
||||
"``PyModule_ExecDef`` must be called to fully initialize a module."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:354
|
||||
msgid ""
|
||||
"Create a new module object, given the definition in *module* and the "
|
||||
"ModuleSpec *spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2` "
|
||||
"with *module_api_version* set to :const:`PYTHON_API_VERSION`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:362
|
||||
msgid ""
|
||||
"Create a new module object, given the definition in *module* and the "
|
||||
"ModuleSpec *spec*, assuming the API version *module_api_version*. If that "
|
||||
"version does not match the version of the running interpreter, a :exc:"
|
||||
"`RuntimeWarning` is emitted."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:369
|
||||
msgid ""
|
||||
"Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` "
|
||||
"instead; only use this if you are sure you need it."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:376
|
||||
msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:382
|
||||
msgid ""
|
||||
"Set the docstring for *module* to *docstring*. This function is called "
|
||||
"automatically when creating a module from ``PyModuleDef``, using either "
|
||||
"``PyModule_Create`` or ``PyModule_FromDefAndSpec``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:391
|
||||
msgid ""
|
||||
"Add the functions from the *NULL* terminated *functions* array to *module*. "
|
||||
"Refer to the :c:type:`PyMethodDef` documentation for details on individual "
|
||||
"entries (due to the lack of a shared module namespace, module level "
|
||||
"\"functions\" implemented in C typically receive the module as their first "
|
||||
"parameter, making them similar to instance methods on Python classes). This "
|
||||
"function is called automatically when creating a module from "
|
||||
"``PyModuleDef``, using either ``PyModule_Create`` or "
|
||||
"``PyModule_FromDefAndSpec``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:403
|
||||
msgid "Support functions"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:405
|
||||
msgid ""
|
||||
"The module initialization function (if using single phase initialization) or "
|
||||
"a function called from a module execution slot (if using multi-phase "
|
||||
"initialization), can use the following functions to help initialize the "
|
||||
"module state:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:412
|
||||
msgid ""
|
||||
"Add an object to *module* as *name*. This is a convenience function which "
|
||||
"can be used from the module's initialization function. This steals a "
|
||||
"reference to *value*. Return ``-1`` on error, ``0`` on success."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:418
|
||||
msgid ""
|
||||
"Add an integer constant to *module* as *name*. This convenience function "
|
||||
"can be used from the module's initialization function. Return ``-1`` on "
|
||||
"error, ``0`` on success."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:425
|
||||
msgid ""
|
||||
"Add a string constant to *module* as *name*. This convenience function can "
|
||||
"be used from the module's initialization function. The string *value* must "
|
||||
"be *NULL*-terminated. Return ``-1`` on error, ``0`` on success."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:432
|
||||
msgid ""
|
||||
"Add an int constant to *module*. The name and the value are taken from "
|
||||
"*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int "
|
||||
"constant *AF_INET* with the value of *AF_INET* to *module*. Return ``-1`` on "
|
||||
"error, ``0`` on success."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:440
|
||||
msgid "Add a string constant to *module*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:444
|
||||
msgid "Module lookup"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:446
|
||||
msgid ""
|
||||
"Single-phase initialization creates singleton modules that can be looked up "
|
||||
"in the context of the current interpreter. This allows the module object to "
|
||||
"be retrieved later with only a reference to the module definition."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:450
|
||||
msgid ""
|
||||
"These functions will not work on modules created using multi-phase "
|
||||
"initialization, since multiple such modules can be created from a single "
|
||||
"definition."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:455
|
||||
msgid ""
|
||||
"Returns the module object that was created from *def* for the current "
|
||||
"interpreter. This method requires that the module object has been attached "
|
||||
"to the interpreter state with :c:func:`PyState_AddModule` beforehand. In "
|
||||
"case the corresponding module object is not found or has not been attached "
|
||||
"to the interpreter state yet, it returns *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:462
|
||||
msgid ""
|
||||
"Attaches the module object passed to the function to the interpreter state. "
|
||||
"This allows the module object to be accessible via :c:func:"
|
||||
"`PyState_FindModule`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:465
|
||||
msgid "Only effective on modules created using single-phase initialization."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/module.rst:471
|
||||
msgid ""
|
||||
"Removes the module object created from *def* from the interpreter state."
|
||||
msgstr ""
|
|
@ -0,0 +1,42 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/none.rst:6
|
||||
msgid "The ``None`` Object"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/none.rst:10
|
||||
msgid ""
|
||||
"Note that the :c:type:`PyTypeObject` for ``None`` is not directly exposed in "
|
||||
"the Python/C API. Since ``None`` is a singleton, testing for object "
|
||||
"identity (using ``==`` in C) is sufficient. There is no :c:func:"
|
||||
"`PyNone_Check` function for the same reason."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/none.rst:18
|
||||
msgid ""
|
||||
"The Python ``None`` object, denoting lack of value. This object has no "
|
||||
"methods. It needs to be treated just like any other object with respect to "
|
||||
"reference counts."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/none.rst:25
|
||||
msgid ""
|
||||
"Properly handle returning :c:data:`Py_None` from within a C function (that "
|
||||
"is, increment the reference count of ``None`` and return it.)"
|
||||
msgstr ""
|
|
@ -0,0 +1,286 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/number.rst:6
|
||||
msgid "Number Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:11
|
||||
msgid ""
|
||||
"Returns ``1`` if the object *o* provides numeric protocols, and false "
|
||||
"otherwise. This function always succeeds."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:17
|
||||
msgid ""
|
||||
"Returns the result of adding *o1* and *o2*, or *NULL* on failure. This is "
|
||||
"the equivalent of the Python expression ``o1 + o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:23
|
||||
msgid ""
|
||||
"Returns the result of subtracting *o2* from *o1*, or *NULL* on failure. "
|
||||
"This is the equivalent of the Python expression ``o1 - o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:29
|
||||
msgid ""
|
||||
"Returns the result of multiplying *o1* and *o2*, or *NULL* on failure. This "
|
||||
"is the equivalent of the Python expression ``o1 * o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:35
|
||||
msgid ""
|
||||
"Returns the result of matrix multiplication on *o1* and *o2*, or *NULL* on "
|
||||
"failure. This is the equivalent of the Python expression ``o1 @ o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:43
|
||||
msgid ""
|
||||
"Return the floor of *o1* divided by *o2*, or *NULL* on failure. This is "
|
||||
"equivalent to the \"classic\" division of integers."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:49
|
||||
msgid ""
|
||||
"Return a reasonable approximation for the mathematical value of *o1* divided "
|
||||
"by *o2*, or *NULL* on failure. The return value is \"approximate\" because "
|
||||
"binary floating point numbers are approximate; it is not possible to "
|
||||
"represent all real numbers in base two. This function can return a floating "
|
||||
"point value when passed two integers."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:58
|
||||
msgid ""
|
||||
"Returns the remainder of dividing *o1* by *o2*, or *NULL* on failure. This "
|
||||
"is the equivalent of the Python expression ``o1 % o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:66
|
||||
msgid ""
|
||||
"See the built-in function :func:`divmod`. Returns *NULL* on failure. This "
|
||||
"is the equivalent of the Python expression ``divmod(o1, o2)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:74
|
||||
msgid ""
|
||||
"See the built-in function :func:`pow`. Returns *NULL* on failure. This is "
|
||||
"the equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is "
|
||||
"optional. If *o3* is to be ignored, pass :c:data:`Py_None` in its place "
|
||||
"(passing *NULL* for *o3* would cause an illegal memory access)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:82
|
||||
msgid ""
|
||||
"Returns the negation of *o* on success, or *NULL* on failure. This is the "
|
||||
"equivalent of the Python expression ``-o``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:88
|
||||
msgid ""
|
||||
"Returns *o* on success, or *NULL* on failure. This is the equivalent of the "
|
||||
"Python expression ``+o``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:96
|
||||
msgid ""
|
||||
"Returns the absolute value of *o*, or *NULL* on failure. This is the "
|
||||
"equivalent of the Python expression ``abs(o)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:102
|
||||
msgid ""
|
||||
"Returns the bitwise negation of *o* on success, or *NULL* on failure. This "
|
||||
"is the equivalent of the Python expression ``~o``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:108
|
||||
msgid ""
|
||||
"Returns the result of left shifting *o1* by *o2* on success, or *NULL* on "
|
||||
"failure. This is the equivalent of the Python expression ``o1 << o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:114
|
||||
msgid ""
|
||||
"Returns the result of right shifting *o1* by *o2* on success, or *NULL* on "
|
||||
"failure. This is the equivalent of the Python expression ``o1 >> o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:120
|
||||
msgid ""
|
||||
"Returns the \"bitwise and\" of *o1* and *o2* on success and *NULL* on "
|
||||
"failure. This is the equivalent of the Python expression ``o1 & o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:126
|
||||
msgid ""
|
||||
"Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or *NULL* "
|
||||
"on failure. This is the equivalent of the Python expression ``o1 ^ o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:132
|
||||
msgid ""
|
||||
"Returns the \"bitwise or\" of *o1* and *o2* on success, or *NULL* on "
|
||||
"failure. This is the equivalent of the Python expression ``o1 | o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:138
|
||||
msgid ""
|
||||
"Returns the result of adding *o1* and *o2*, or *NULL* on failure. The "
|
||||
"operation is done *in-place* when *o1* supports it. This is the equivalent "
|
||||
"of the Python statement ``o1 += o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:145
|
||||
msgid ""
|
||||
"Returns the result of subtracting *o2* from *o1*, or *NULL* on failure. The "
|
||||
"operation is done *in-place* when *o1* supports it. This is the equivalent "
|
||||
"of the Python statement ``o1 -= o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:152
|
||||
msgid ""
|
||||
"Returns the result of multiplying *o1* and *o2*, or *NULL* on failure. The "
|
||||
"operation is done *in-place* when *o1* supports it. This is the equivalent "
|
||||
"of the Python statement ``o1 *= o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:159
|
||||
msgid ""
|
||||
"Returns the result of matrix multiplication on *o1* and *o2*, or *NULL* on "
|
||||
"failure. The operation is done *in-place* when *o1* supports it. This is "
|
||||
"the equivalent of the Python statement ``o1 @= o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:168
|
||||
msgid ""
|
||||
"Returns the mathematical floor of dividing *o1* by *o2*, or *NULL* on "
|
||||
"failure. The operation is done *in-place* when *o1* supports it. This is "
|
||||
"the equivalent of the Python statement ``o1 //= o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:175
|
||||
msgid ""
|
||||
"Return a reasonable approximation for the mathematical value of *o1* divided "
|
||||
"by *o2*, or *NULL* on failure. The return value is \"approximate\" because "
|
||||
"binary floating point numbers are approximate; it is not possible to "
|
||||
"represent all real numbers in base two. This function can return a floating "
|
||||
"point value when passed two integers. The operation is done *in-place* when "
|
||||
"*o1* supports it."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:184
|
||||
msgid ""
|
||||
"Returns the remainder of dividing *o1* by *o2*, or *NULL* on failure. The "
|
||||
"operation is done *in-place* when *o1* supports it. This is the equivalent "
|
||||
"of the Python statement ``o1 %= o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:193
|
||||
msgid ""
|
||||
"See the built-in function :func:`pow`. Returns *NULL* on failure. The "
|
||||
"operation is done *in-place* when *o1* supports it. This is the equivalent "
|
||||
"of the Python statement ``o1 **= o2`` when o3 is :c:data:`Py_None`, or an in-"
|
||||
"place variant of ``pow(o1, o2, o3)`` otherwise. If *o3* is to be ignored, "
|
||||
"pass :c:data:`Py_None` in its place (passing *NULL* for *o3* would cause an "
|
||||
"illegal memory access)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:202
|
||||
msgid ""
|
||||
"Returns the result of left shifting *o1* by *o2* on success, or *NULL* on "
|
||||
"failure. The operation is done *in-place* when *o1* supports it. This is "
|
||||
"the equivalent of the Python statement ``o1 <<= o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:209
|
||||
msgid ""
|
||||
"Returns the result of right shifting *o1* by *o2* on success, or *NULL* on "
|
||||
"failure. The operation is done *in-place* when *o1* supports it. This is "
|
||||
"the equivalent of the Python statement ``o1 >>= o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:216
|
||||
msgid ""
|
||||
"Returns the \"bitwise and\" of *o1* and *o2* on success and *NULL* on "
|
||||
"failure. The operation is done *in-place* when *o1* supports it. This is "
|
||||
"the equivalent of the Python statement ``o1 &= o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:223
|
||||
msgid ""
|
||||
"Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or *NULL* "
|
||||
"on failure. The operation is done *in-place* when *o1* supports it. This "
|
||||
"is the equivalent of the Python statement ``o1 ^= o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:230
|
||||
msgid ""
|
||||
"Returns the \"bitwise or\" of *o1* and *o2* on success, or *NULL* on "
|
||||
"failure. The operation is done *in-place* when *o1* supports it. This is "
|
||||
"the equivalent of the Python statement ``o1 |= o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:239
|
||||
msgid ""
|
||||
"Returns the *o* converted to an integer object on success, or *NULL* on "
|
||||
"failure. This is the equivalent of the Python expression ``int(o)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:247
|
||||
msgid ""
|
||||
"Returns the *o* converted to a float object on success, or *NULL* on "
|
||||
"failure. This is the equivalent of the Python expression ``float(o)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:253
|
||||
msgid ""
|
||||
"Returns the *o* converted to a Python int on success or *NULL* with a :exc:"
|
||||
"`TypeError` exception raised on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:259
|
||||
msgid ""
|
||||
"Returns the integer *n* converted to base *base* as a string. The *base* "
|
||||
"argument must be one of 2, 8, 10, or 16. For base 2, 8, or 16, the returned "
|
||||
"string is prefixed with a base marker of ``'0b'``, ``'0o'``, or ``'0x'``, "
|
||||
"respectively. If *n* is not a Python int, it is converted with :c:func:"
|
||||
"`PyNumber_Index` first."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:268
|
||||
msgid ""
|
||||
"Returns *o* converted to a Py_ssize_t value if *o* can be interpreted as an "
|
||||
"integer. If the call fails, an exception is raised and -1 is returned."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:271
|
||||
msgid ""
|
||||
"If *o* can be converted to a Python int but the attempt to convert to a "
|
||||
"Py_ssize_t value would raise an :exc:`OverflowError`, then the *exc* "
|
||||
"argument is the type of exception that will be raised (usually :exc:"
|
||||
"`IndexError` or :exc:`OverflowError`). If *exc* is *NULL*, then the "
|
||||
"exception is cleared and the value is clipped to *PY_SSIZE_T_MIN* for a "
|
||||
"negative integer or *PY_SSIZE_T_MAX* for a positive integer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/number.rst:281
|
||||
msgid ""
|
||||
"Returns ``1`` if *o* is an index integer (has the nb_index slot of the "
|
||||
"tp_as_number structure filled in), and ``0`` otherwise."
|
||||
msgstr ""
|
|
@ -0,0 +1,71 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/objbuffer.rst:4
|
||||
msgid "Old Buffer Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/objbuffer.rst:8
|
||||
msgid ""
|
||||
"These functions were part of the \"old buffer protocol\" API in Python 2. In "
|
||||
"Python 3, this protocol doesn't exist anymore but the functions are still "
|
||||
"exposed to ease porting 2.x code. They act as a compatibility wrapper "
|
||||
"around the :ref:`new buffer protocol <bufferobjects>`, but they don't give "
|
||||
"you control over the lifetime of the resources acquired when a buffer is "
|
||||
"exported."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/objbuffer.rst:15
|
||||
msgid ""
|
||||
"Therefore, it is recommended that you call :c:func:`PyObject_GetBuffer` (or "
|
||||
"the ``y*`` or ``w*`` :ref:`format codes <arg-parsing>` with the :c:func:"
|
||||
"`PyArg_ParseTuple` family of functions) to get a buffer view over an object, "
|
||||
"and :c:func:`PyBuffer_Release` when the buffer view can be released."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/objbuffer.rst:23
|
||||
msgid ""
|
||||
"Returns a pointer to a read-only memory location usable as character-based "
|
||||
"input. The *obj* argument must support the single-segment character buffer "
|
||||
"interface. On success, returns ``0``, sets *buffer* to the memory location "
|
||||
"and *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:"
|
||||
"`TypeError` on error."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/objbuffer.rst:32
|
||||
msgid ""
|
||||
"Returns a pointer to a read-only memory location containing arbitrary data. "
|
||||
"The *obj* argument must support the single-segment readable buffer "
|
||||
"interface. On success, returns ``0``, sets *buffer* to the memory location "
|
||||
"and *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:"
|
||||
"`TypeError` on error."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/objbuffer.rst:41
|
||||
msgid ""
|
||||
"Returns ``1`` if *o* supports the single-segment readable buffer interface. "
|
||||
"Otherwise returns ``0``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/objbuffer.rst:47
|
||||
msgid ""
|
||||
"Returns a pointer to a writable memory location. The *obj* argument must "
|
||||
"support the single-segment, character buffer interface. On success, returns "
|
||||
"``0``, sets *buffer* to the memory location and *buffer_len* to the buffer "
|
||||
"length. Returns ``-1`` and sets a :exc:`TypeError` on error."
|
||||
msgstr ""
|
|
@ -0,0 +1,417 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/object.rst:6
|
||||
msgid "Object Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:11
|
||||
msgid ""
|
||||
"The ``NotImplemented`` singleton, used to signal that an operation is not "
|
||||
"implemented for the given type combination."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:17
|
||||
msgid ""
|
||||
"Properly handle returning :c:data:`Py_NotImplemented` from within a C "
|
||||
"function (that is, increment the reference count of NotImplemented and "
|
||||
"return it)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:24
|
||||
msgid ""
|
||||
"Print an object *o*, on file *fp*. Returns ``-1`` on error. The flags "
|
||||
"argument is used to enable certain printing options. The only option "
|
||||
"currently supported is :const:`Py_PRINT_RAW`; if given, the :func:`str` of "
|
||||
"the object is written instead of the :func:`repr`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:32 ../Doc/c-api/object.rst:39
|
||||
msgid ""
|
||||
"Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise. "
|
||||
"This is equivalent to the Python expression ``hasattr(o, attr_name)``. This "
|
||||
"function always succeeds."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:46
|
||||
msgid ""
|
||||
"Retrieve an attribute named *attr_name* from object *o*. Returns the "
|
||||
"attribute value on success, or *NULL* on failure. This is the equivalent of "
|
||||
"the Python expression ``o.attr_name``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:53
|
||||
msgid ""
|
||||
"Retrieve an attribute named *attr_name* from object *o*. Returns the "
|
||||
"attribute value on success, or *NULL* on failure. This is the equivalent of "
|
||||
"the Python expression ``o.attr_name``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:60
|
||||
msgid ""
|
||||
"Generic attribute getter function that is meant to be put into a type "
|
||||
"object's ``tp_getattro`` slot. It looks for a descriptor in the dictionary "
|
||||
"of classes in the object's MRO as well as an attribute in the object's :attr:"
|
||||
"`~object.__dict__` (if present). As outlined in :ref:`descriptors`, data "
|
||||
"descriptors take preference over instance attributes, while non-data "
|
||||
"descriptors don't. Otherwise, an :exc:`AttributeError` is raised."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:70 ../Doc/c-api/object.rst:81
|
||||
msgid ""
|
||||
"Set the value of the attribute named *attr_name*, for object *o*, to the "
|
||||
"value *v*. Raise an exception and return ``-1`` on failure; return ``0`` on "
|
||||
"success. This is the equivalent of the Python statement ``o.attr_name = v``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:75
|
||||
msgid ""
|
||||
"If *v* is *NULL*, the attribute is deleted, however this feature is "
|
||||
"deprecated in favour of using :c:func:`PyObject_DelAttr`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:86
|
||||
msgid ""
|
||||
"If *v* is *NULL*, the attribute is deleted, however this feature is "
|
||||
"deprecated in favour of using :c:func:`PyObject_DelAttrString`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:92
|
||||
msgid ""
|
||||
"Generic attribute setter and deleter function that is meant to be put into a "
|
||||
"type object's :c:member:`~PyTypeObject.tp_setattro` slot. It looks for a "
|
||||
"data descriptor in the dictionary of classes in the object's MRO, and if "
|
||||
"found it takes preference over setting or deleting the attribute in the "
|
||||
"instance dictionary. Otherwise, the attribute is set or deleted in the "
|
||||
"object's :attr:`~object.__dict__` (if present). On success, ``0`` is "
|
||||
"returned, otherwise an :exc:`AttributeError` is raised and ``-1`` is "
|
||||
"returned."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:104 ../Doc/c-api/object.rst:110
|
||||
msgid ""
|
||||
"Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on "
|
||||
"failure. This is the equivalent of the Python statement ``del o.attr_name``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:116
|
||||
msgid ""
|
||||
"A generic implementation for the getter of a ``__dict__`` descriptor. It "
|
||||
"creates the dictionary if necessary."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:124
|
||||
msgid ""
|
||||
"A generic implementation for the setter of a ``__dict__`` descriptor. This "
|
||||
"implementation does not allow the dictionary to be deleted."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:132
|
||||
msgid ""
|
||||
"Compare the values of *o1* and *o2* using the operation specified by *opid*, "
|
||||
"which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:"
|
||||
"`Py_NE`, :const:`Py_GT`, or :const:`Py_GE`, corresponding to ``<``, ``<=``, "
|
||||
"``==``, ``!=``, ``>``, or ``>=`` respectively. This is the equivalent of the "
|
||||
"Python expression ``o1 op o2``, where ``op`` is the operator corresponding "
|
||||
"to *opid*. Returns the value of the comparison on success, or *NULL* on "
|
||||
"failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:142
|
||||
msgid ""
|
||||
"Compare the values of *o1* and *o2* using the operation specified by *opid*, "
|
||||
"which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:"
|
||||
"`Py_NE`, :const:`Py_GT`, or :const:`Py_GE`, corresponding to ``<``, ``<=``, "
|
||||
"``==``, ``!=``, ``>``, or ``>=`` respectively. Returns ``-1`` on error, "
|
||||
"``0`` if the result is false, ``1`` otherwise. This is the equivalent of the "
|
||||
"Python expression ``o1 op o2``, where ``op`` is the operator corresponding "
|
||||
"to *opid*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:151
|
||||
msgid ""
|
||||
"If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` "
|
||||
"will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:158
|
||||
msgid ""
|
||||
"Compute a string representation of object *o*. Returns the string "
|
||||
"representation on success, *NULL* on failure. This is the equivalent of the "
|
||||
"Python expression ``repr(o)``. Called by the :func:`repr` built-in function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:162 ../Doc/c-api/object.rst:186
|
||||
msgid ""
|
||||
"This function now includes a debug assertion to help ensure that it does not "
|
||||
"silently discard an active exception."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:170
|
||||
msgid ""
|
||||
"As :c:func:`PyObject_Repr`, compute a string representation of object *o*, "
|
||||
"but escape the non-ASCII characters in the string returned by :c:func:"
|
||||
"`PyObject_Repr` with ``\\x``, ``\\u`` or ``\\U`` escapes. This generates a "
|
||||
"string similar to that returned by :c:func:`PyObject_Repr` in Python 2. "
|
||||
"Called by the :func:`ascii` built-in function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:181
|
||||
msgid ""
|
||||
"Compute a string representation of object *o*. Returns the string "
|
||||
"representation on success, *NULL* on failure. This is the equivalent of the "
|
||||
"Python expression ``str(o)``. Called by the :func:`str` built-in function "
|
||||
"and, therefore, by the :func:`print` function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:194
|
||||
msgid ""
|
||||
"Compute a bytes representation of object *o*. *NULL* is returned on failure "
|
||||
"and a bytes object on success. This is equivalent to the Python expression "
|
||||
"``bytes(o)``, when *o* is not an integer. Unlike ``bytes(o)``, a TypeError "
|
||||
"is raised when *o* is an integer instead of a zero-initialized bytes object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:203
|
||||
msgid ""
|
||||
"Return ``1`` if the class *derived* is identical to or derived from the "
|
||||
"class *cls*, otherwise return ``0``. In case of an error, return ``-1``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:206 ../Doc/c-api/object.rst:225
|
||||
msgid ""
|
||||
"If *cls* is a tuple, the check will be done against every entry in *cls*. "
|
||||
"The result will be ``1`` when at least one of the checks returns ``1``, "
|
||||
"otherwise it will be ``0``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:210
|
||||
msgid ""
|
||||
"If *cls* has a :meth:`~class.__subclasscheck__` method, it will be called to "
|
||||
"determine the subclass status as described in :pep:`3119`. Otherwise, "
|
||||
"*derived* is a subclass of *cls* if it is a direct or indirect subclass, i."
|
||||
"e. contained in ``cls.__mro__``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:215
|
||||
msgid ""
|
||||
"Normally only class objects, i.e. instances of :class:`type` or a derived "
|
||||
"class, are considered classes. However, objects can override this by having "
|
||||
"a :attr:`__bases__` attribute (which must be a tuple of base classes)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:222
|
||||
msgid ""
|
||||
"Return ``1`` if *inst* is an instance of the class *cls* or a subclass of "
|
||||
"*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:229
|
||||
msgid ""
|
||||
"If *cls* has a :meth:`~class.__instancecheck__` method, it will be called to "
|
||||
"determine the subclass status as described in :pep:`3119`. Otherwise, "
|
||||
"*inst* is an instance of *cls* if its class is a subclass of *cls*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:233
|
||||
msgid ""
|
||||
"An instance *inst* can override what is considered its class by having a :"
|
||||
"attr:`__class__` attribute."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:236
|
||||
msgid ""
|
||||
"An object *cls* can override if it is considered a class, and what its base "
|
||||
"classes are, by having a :attr:`__bases__` attribute (which must be a tuple "
|
||||
"of base classes)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:243
|
||||
msgid ""
|
||||
"Determine if the object *o* is callable. Return ``1`` if the object is "
|
||||
"callable and ``0`` otherwise. This function always succeeds."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:249
|
||||
msgid ""
|
||||
"Call a callable Python object *callable_object*, with arguments given by the "
|
||||
"tuple *args*, and named arguments given by the dictionary *kw*. If no named "
|
||||
"arguments are needed, *kw* may be *NULL*. *args* must not be *NULL*, use an "
|
||||
"empty tuple if no arguments are needed. Returns the result of the call on "
|
||||
"success, or *NULL* on failure. This is the equivalent of the Python "
|
||||
"expression ``callable_object(*args, **kw)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:259
|
||||
msgid ""
|
||||
"Call a callable Python object *callable_object*, with arguments given by the "
|
||||
"tuple *args*. If no arguments are needed, then *args* may be *NULL*. "
|
||||
"Returns the result of the call on success, or *NULL* on failure. This is "
|
||||
"the equivalent of the Python expression ``callable_object(*args)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:267
|
||||
msgid ""
|
||||
"Call a callable Python object *callable*, with a variable number of C "
|
||||
"arguments. The C arguments are described using a :c:func:`Py_BuildValue` "
|
||||
"style format string. The format may be *NULL*, indicating that no arguments "
|
||||
"are provided. Returns the result of the call on success, or *NULL* on "
|
||||
"failure. This is the equivalent of the Python expression "
|
||||
"``callable(*args)``. Note that if you only pass :c:type:`PyObject \\*` "
|
||||
"args, :c:func:`PyObject_CallFunctionObjArgs` is a faster alternative."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:275
|
||||
msgid "The type of *format* was changed from ``char *``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:281
|
||||
msgid ""
|
||||
"Call the method named *method* of object *o* with a variable number of C "
|
||||
"arguments. The C arguments are described by a :c:func:`Py_BuildValue` "
|
||||
"format string that should produce a tuple. The format may be *NULL*, "
|
||||
"indicating that no arguments are provided. Returns the result of the call on "
|
||||
"success, or *NULL* on failure. This is the equivalent of the Python "
|
||||
"expression ``o.method(args)``. Note that if you only pass :c:type:`PyObject "
|
||||
"\\*` args, :c:func:`PyObject_CallMethodObjArgs` is a faster alternative."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:289
|
||||
msgid "The types of *method* and *format* were changed from ``char *``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:295
|
||||
msgid ""
|
||||
"Call a callable Python object *callable*, with a variable number of :c:type:"
|
||||
"`PyObject\\*` arguments. The arguments are provided as a variable number of "
|
||||
"parameters followed by *NULL*. Returns the result of the call on success, or "
|
||||
"*NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:303
|
||||
msgid ""
|
||||
"Calls a method of the object *o*, where the name of the method is given as a "
|
||||
"Python string object in *name*. It is called with a variable number of :c:"
|
||||
"type:`PyObject\\*` arguments. The arguments are provided as a variable "
|
||||
"number of parameters followed by *NULL*. Returns the result of the call on "
|
||||
"success, or *NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:314
|
||||
msgid ""
|
||||
"Compute and return the hash value of an object *o*. On failure, return "
|
||||
"``-1``. This is the equivalent of the Python expression ``hash(o)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:317
|
||||
msgid ""
|
||||
"The return type is now Py_hash_t. This is a signed integer the same size as "
|
||||
"Py_ssize_t."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:324
|
||||
msgid ""
|
||||
"Set a :exc:`TypeError` indicating that ``type(o)`` is not hashable and "
|
||||
"return ``-1``. This function receives special treatment when stored in a "
|
||||
"``tp_hash`` slot, allowing a type to explicitly indicate to the interpreter "
|
||||
"that it is not hashable."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:332
|
||||
msgid ""
|
||||
"Returns ``1`` if the object *o* is considered to be true, and ``0`` "
|
||||
"otherwise. This is equivalent to the Python expression ``not not o``. On "
|
||||
"failure, return ``-1``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:339
|
||||
msgid ""
|
||||
"Returns ``0`` if the object *o* is considered to be true, and ``1`` "
|
||||
"otherwise. This is equivalent to the Python expression ``not o``. On "
|
||||
"failure, return ``-1``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:348
|
||||
msgid ""
|
||||
"When *o* is non-*NULL*, returns a type object corresponding to the object "
|
||||
"type of object *o*. On failure, raises :exc:`SystemError` and returns "
|
||||
"*NULL*. This is equivalent to the Python expression ``type(o)``. This "
|
||||
"function increments the reference count of the return value. There's really "
|
||||
"no reason to use this function instead of the common expression ``o-"
|
||||
">ob_type``, which returns a pointer of type :c:type:`PyTypeObject\\*`, "
|
||||
"except when the incremented reference count is needed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:359
|
||||
msgid ""
|
||||
"Return true if the object *o* is of type *type* or a subtype of *type*. "
|
||||
"Both parameters must be non-*NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:368
|
||||
msgid ""
|
||||
"Return the length of object *o*. If the object *o* provides either the "
|
||||
"sequence and mapping protocols, the sequence length is returned. On error, "
|
||||
"``-1`` is returned. This is the equivalent to the Python expression "
|
||||
"``len(o)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:375
|
||||
msgid ""
|
||||
"Return an estimated length for the object *o*. First try to return its "
|
||||
"actual length, then an estimate using :meth:`~object.__length_hint__`, and "
|
||||
"finally return the default value. On error return ``-1``. This is the "
|
||||
"equivalent to the Python expression ``operator.length_hint(o, default)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:385
|
||||
msgid ""
|
||||
"Return element of *o* corresponding to the object *key* or *NULL* on "
|
||||
"failure. This is the equivalent of the Python expression ``o[key]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:391
|
||||
msgid ""
|
||||
"Map the object *key* to the value *v*. Raise an exception and return ``-1`` "
|
||||
"on failure; return ``0`` on success. This is the equivalent of the Python "
|
||||
"statement ``o[key] = v``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:398
|
||||
msgid ""
|
||||
"Delete the mapping for *key* from *o*. Returns ``-1`` on failure. This is "
|
||||
"the equivalent of the Python statement ``del o[key]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:404
|
||||
msgid ""
|
||||
"This is equivalent to the Python expression ``dir(o)``, returning a "
|
||||
"(possibly empty) list of strings appropriate for the object argument, or "
|
||||
"*NULL* if there was an error. If the argument is *NULL*, this is like the "
|
||||
"Python ``dir()``, returning the names of the current locals; in this case, "
|
||||
"if no execution frame is active then *NULL* is returned but :c:func:"
|
||||
"`PyErr_Occurred` will return false."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/object.rst:413
|
||||
msgid ""
|
||||
"This is equivalent to the Python expression ``iter(o)``. It returns a new "
|
||||
"iterator for the object argument, or the object itself if the object is "
|
||||
"already an iterator. Raises :exc:`TypeError` and returns *NULL* if the "
|
||||
"object cannot be iterated."
|
||||
msgstr ""
|
|
@ -0,0 +1,27 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/objimpl.rst:7
|
||||
msgid "Object Implementation Support"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/objimpl.rst:9
|
||||
msgid ""
|
||||
"This chapter describes the functions, types, and macros used when defining "
|
||||
"new object types."
|
||||
msgstr ""
|
|
@ -0,0 +1,98 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/refcounting.rst:8
|
||||
msgid "Reference Counting"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/refcounting.rst:10
|
||||
msgid ""
|
||||
"The macros in this section are used for managing reference counts of Python "
|
||||
"objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/refcounting.rst:16
|
||||
msgid ""
|
||||
"Increment the reference count for object *o*. The object must not be "
|
||||
"*NULL*; if you aren't sure that it isn't *NULL*, use :c:func:`Py_XINCREF`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/refcounting.rst:22
|
||||
msgid ""
|
||||
"Increment the reference count for object *o*. The object may be *NULL*, in "
|
||||
"which case the macro has no effect."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/refcounting.rst:28
|
||||
msgid ""
|
||||
"Decrement the reference count for object *o*. The object must not be "
|
||||
"*NULL*; if you aren't sure that it isn't *NULL*, use :c:func:`Py_XDECREF`. "
|
||||
"If the reference count reaches zero, the object's type's deallocation "
|
||||
"function (which must not be *NULL*) is invoked."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/refcounting.rst:35
|
||||
msgid ""
|
||||
"The deallocation function can cause arbitrary Python code to be invoked (e."
|
||||
"g. when a class instance with a :meth:`__del__` method is deallocated). "
|
||||
"While exceptions in such code are not propagated, the executed code has free "
|
||||
"access to all Python global variables. This means that any object that is "
|
||||
"reachable from a global variable should be in a consistent state before :c:"
|
||||
"func:`Py_DECREF` is invoked. For example, code to delete an object from a "
|
||||
"list should copy a reference to the deleted object in a temporary variable, "
|
||||
"update the list data structure, and then call :c:func:`Py_DECREF` for the "
|
||||
"temporary variable."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/refcounting.rst:47
|
||||
msgid ""
|
||||
"Decrement the reference count for object *o*. The object may be *NULL*, in "
|
||||
"which case the macro has no effect; otherwise the effect is the same as for :"
|
||||
"c:func:`Py_DECREF`, and the same warning applies."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/refcounting.rst:54
|
||||
msgid ""
|
||||
"Decrement the reference count for object *o*. The object may be *NULL*, in "
|
||||
"which case the macro has no effect; otherwise the effect is the same as for :"
|
||||
"c:func:`Py_DECREF`, except that the argument is also set to *NULL*. The "
|
||||
"warning for :c:func:`Py_DECREF` does not apply with respect to the object "
|
||||
"passed because the macro carefully uses a temporary variable and sets the "
|
||||
"argument to *NULL* before decrementing its reference count."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/refcounting.rst:61
|
||||
msgid ""
|
||||
"It is a good idea to use this macro whenever decrementing the value of a "
|
||||
"variable that might be traversed during garbage collection."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/refcounting.rst:65
|
||||
msgid ""
|
||||
"The following functions are for runtime dynamic embedding of Python: "
|
||||
"``Py_IncRef(PyObject *o)``, ``Py_DecRef(PyObject *o)``. They are simply "
|
||||
"exported function versions of :c:func:`Py_XINCREF` and :c:func:`Py_XDECREF`, "
|
||||
"respectively."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/refcounting.rst:70
|
||||
msgid ""
|
||||
"The following functions or macros are only for use within the interpreter "
|
||||
"core: :c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:"
|
||||
"`_Py_NewReference`, as well as the global variable :c:data:`_Py_RefTotal`."
|
||||
msgstr ""
|
|
@ -0,0 +1,63 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/reflection.rst:6
|
||||
msgid "Reflection"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/reflection.rst:10
|
||||
msgid ""
|
||||
"Return a dictionary of the builtins in the current execution frame, or the "
|
||||
"interpreter of the thread state if no frame is currently executing."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/reflection.rst:16
|
||||
msgid ""
|
||||
"Return a dictionary of the local variables in the current execution frame, "
|
||||
"or *NULL* if no frame is currently executing."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/reflection.rst:22
|
||||
msgid ""
|
||||
"Return a dictionary of the global variables in the current execution frame, "
|
||||
"or *NULL* if no frame is currently executing."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/reflection.rst:28
|
||||
msgid ""
|
||||
"Return the current thread state's frame, which is *NULL* if no frame is "
|
||||
"currently executing."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/reflection.rst:34
|
||||
msgid "Return the line number that *frame* is currently executing."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/reflection.rst:39
|
||||
msgid ""
|
||||
"Return the name of *func* if it is a function, class or instance object, "
|
||||
"else the name of *func*\\s type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/reflection.rst:45
|
||||
msgid ""
|
||||
"Return a description string, depending on the type of *func*. Return values "
|
||||
"include \"()\" for functions and methods, \" constructor\", \" instance\", "
|
||||
"and \" object\". Concatenated with the result of :c:func:"
|
||||
"`PyEval_GetFuncName`, the result will be a description of *func*."
|
||||
msgstr ""
|
|
@ -0,0 +1,183 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:6
|
||||
msgid "Sequence Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:11
|
||||
msgid ""
|
||||
"Return ``1`` if the object provides sequence protocol, and ``0`` otherwise. "
|
||||
"This function always succeeds."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:20
|
||||
msgid ""
|
||||
"Returns the number of objects in sequence *o* on success, and ``-1`` on "
|
||||
"failure. For objects that do not provide sequence protocol, this is "
|
||||
"equivalent to the Python expression ``len(o)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:27
|
||||
msgid ""
|
||||
"Return the concatenation of *o1* and *o2* on success, and *NULL* on failure. "
|
||||
"This is the equivalent of the Python expression ``o1 + o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:33
|
||||
msgid ""
|
||||
"Return the result of repeating sequence object *o* *count* times, or *NULL* "
|
||||
"on failure. This is the equivalent of the Python expression ``o * count``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:39
|
||||
msgid ""
|
||||
"Return the concatenation of *o1* and *o2* on success, and *NULL* on failure. "
|
||||
"The operation is done *in-place* when *o1* supports it. This is the "
|
||||
"equivalent of the Python expression ``o1 += o2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:46
|
||||
msgid ""
|
||||
"Return the result of repeating sequence object *o* *count* times, or *NULL* "
|
||||
"on failure. The operation is done *in-place* when *o* supports it. This is "
|
||||
"the equivalent of the Python expression ``o *= count``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:53
|
||||
msgid ""
|
||||
"Return the *i*\\ th element of *o*, or *NULL* on failure. This is the "
|
||||
"equivalent of the Python expression ``o[i]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:59
|
||||
msgid ""
|
||||
"Return the slice of sequence object *o* between *i1* and *i2*, or *NULL* on "
|
||||
"failure. This is the equivalent of the Python expression ``o[i1:i2]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:65
|
||||
msgid ""
|
||||
"Assign object *v* to the *i*\\ th element of *o*. Raise an exception and "
|
||||
"return ``-1`` on failure; return ``0`` on success. This is the equivalent "
|
||||
"of the Python statement ``o[i] = v``. This function *does not* steal a "
|
||||
"reference to *v*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:70
|
||||
msgid ""
|
||||
"If *v* is *NULL*, the element is deleted, however this feature is deprecated "
|
||||
"in favour of using :c:func:`PySequence_DelItem`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:76
|
||||
msgid ""
|
||||
"Delete the *i*\\ th element of object *o*. Returns ``-1`` on failure. This "
|
||||
"is the equivalent of the Python statement ``del o[i]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:82
|
||||
msgid ""
|
||||
"Assign the sequence object *v* to the slice in sequence object *o* from *i1* "
|
||||
"to *i2*. This is the equivalent of the Python statement ``o[i1:i2] = v``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:88
|
||||
msgid ""
|
||||
"Delete the slice in sequence object *o* from *i1* to *i2*. Returns ``-1`` "
|
||||
"on failure. This is the equivalent of the Python statement ``del o[i1:i2]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:94
|
||||
msgid ""
|
||||
"Return the number of occurrences of *value* in *o*, that is, return the "
|
||||
"number of keys for which ``o[key] == value``. On failure, return ``-1``. "
|
||||
"This is equivalent to the Python expression ``o.count(value)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:101
|
||||
msgid ""
|
||||
"Determine if *o* contains *value*. If an item in *o* is equal to *value*, "
|
||||
"return ``1``, otherwise return ``0``. On error, return ``-1``. This is "
|
||||
"equivalent to the Python expression ``value in o``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:108
|
||||
msgid ""
|
||||
"Return the first index *i* for which ``o[i] == value``. On error, return "
|
||||
"``-1``. This is equivalent to the Python expression ``o.index(value)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:114
|
||||
msgid ""
|
||||
"Return a list object with the same contents as the sequence or iterable *o*, "
|
||||
"or *NULL* on failure. The returned list is guaranteed to be new. This is "
|
||||
"equivalent to the Python expression ``list(o)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:123
|
||||
msgid ""
|
||||
"Return a tuple object with the same contents as the arbitrary sequence *o* "
|
||||
"or *NULL* on failure. If *o* is a tuple, a new reference will be returned, "
|
||||
"otherwise a tuple will be constructed with the appropriate contents. This "
|
||||
"is equivalent to the Python expression ``tuple(o)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:131
|
||||
msgid ""
|
||||
"Return the sequence *o* as a list, unless it is already a tuple or list, in "
|
||||
"which case *o* is returned. Use :c:func:`PySequence_Fast_GET_ITEM` to "
|
||||
"access the members of the result. Returns *NULL* on failure. If the object "
|
||||
"is not a sequence, raises :exc:`TypeError` with *m* as the message text."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:139
|
||||
msgid ""
|
||||
"Return the *i*\\ th element of *o*, assuming that *o* was returned by :c:"
|
||||
"func:`PySequence_Fast`, *o* is not *NULL*, and that *i* is within bounds."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:145
|
||||
msgid ""
|
||||
"Return the underlying array of PyObject pointers. Assumes that *o* was "
|
||||
"returned by :c:func:`PySequence_Fast` and *o* is not *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:148
|
||||
msgid ""
|
||||
"Note, if a list gets resized, the reallocation may relocate the items array. "
|
||||
"So, only use the underlying array pointer in contexts where the sequence "
|
||||
"cannot change."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:155
|
||||
msgid ""
|
||||
"Return the *i*\\ th element of *o* or *NULL* on failure. Macro form of :c:"
|
||||
"func:`PySequence_GetItem` but without checking that :c:func:"
|
||||
"`PySequence_Check` on *o* is true and without adjustment for negative "
|
||||
"indices."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sequence.rst:163
|
||||
msgid ""
|
||||
"Returns the length of *o*, assuming that *o* was returned by :c:func:"
|
||||
"`PySequence_Fast` and that *o* is not *NULL*. The size can also be gotten "
|
||||
"by calling :c:func:`PySequence_Size` on *o*, but :c:func:"
|
||||
"`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a list or "
|
||||
"tuple."
|
||||
msgstr ""
|
|
@ -0,0 +1,181 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/set.rst:6
|
||||
msgid "Set Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:15
|
||||
msgid ""
|
||||
"This section details the public API for :class:`set` and :class:`frozenset` "
|
||||
"objects. Any functionality not listed below is best accessed using the "
|
||||
"either the abstract object protocol (including :c:func:"
|
||||
"`PyObject_CallMethod`, :c:func:`PyObject_RichCompareBool`, :c:func:"
|
||||
"`PyObject_Hash`, :c:func:`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:"
|
||||
"`PyObject_Print`, and :c:func:`PyObject_GetIter`) or the abstract number "
|
||||
"protocol (including :c:func:`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:"
|
||||
"func:`PyNumber_Or`, :c:func:`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :"
|
||||
"c:func:`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:"
|
||||
"`PyNumber_InPlaceXor`)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:29
|
||||
msgid ""
|
||||
"This subtype of :c:type:`PyObject` is used to hold the internal data for "
|
||||
"both :class:`set` and :class:`frozenset` objects. It is like a :c:type:"
|
||||
"`PyDictObject` in that it is a fixed size for small sets (much like tuple "
|
||||
"storage) and will point to a separate, variable sized block of memory for "
|
||||
"medium and large sized sets (much like list storage). None of the fields of "
|
||||
"this structure should be considered public and are subject to change. All "
|
||||
"access should be done through the documented API rather than by manipulating "
|
||||
"the values in the structure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:40
|
||||
msgid ""
|
||||
"This is an instance of :c:type:`PyTypeObject` representing the Python :class:"
|
||||
"`set` type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:46
|
||||
msgid ""
|
||||
"This is an instance of :c:type:`PyTypeObject` representing the Python :class:"
|
||||
"`frozenset` type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:49
|
||||
msgid ""
|
||||
"The following type check macros work on pointers to any Python object. "
|
||||
"Likewise, the constructor functions work with any iterable Python object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:55
|
||||
msgid ""
|
||||
"Return true if *p* is a :class:`set` object or an instance of a subtype."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:59
|
||||
msgid ""
|
||||
"Return true if *p* is a :class:`frozenset` object or an instance of a "
|
||||
"subtype."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:64
|
||||
msgid ""
|
||||
"Return true if *p* is a :class:`set` object, a :class:`frozenset` object, or "
|
||||
"an instance of a subtype."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:70
|
||||
msgid ""
|
||||
"Return true if *p* is a :class:`set` object or a :class:`frozenset` object "
|
||||
"but not an instance of a subtype."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:76
|
||||
msgid ""
|
||||
"Return true if *p* is a :class:`frozenset` object but not an instance of a "
|
||||
"subtype."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:82
|
||||
msgid ""
|
||||
"Return a new :class:`set` containing objects returned by the *iterable*. "
|
||||
"The *iterable* may be *NULL* to create a new empty set. Return the new set "
|
||||
"on success or *NULL* on failure. Raise :exc:`TypeError` if *iterable* is "
|
||||
"not actually iterable. The constructor is also useful for copying a set "
|
||||
"(``c=set(s)``)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:91
|
||||
msgid ""
|
||||
"Return a new :class:`frozenset` containing objects returned by the "
|
||||
"*iterable*. The *iterable* may be *NULL* to create a new empty frozenset. "
|
||||
"Return the new set on success or *NULL* on failure. Raise :exc:`TypeError` "
|
||||
"if *iterable* is not actually iterable."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:97
|
||||
msgid ""
|
||||
"The following functions and macros are available for instances of :class:"
|
||||
"`set` or :class:`frozenset` or instances of their subtypes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:105
|
||||
msgid ""
|
||||
"Return the length of a :class:`set` or :class:`frozenset` object. Equivalent "
|
||||
"to ``len(anyset)``. Raises a :exc:`PyExc_SystemError` if *anyset* is not a :"
|
||||
"class:`set`, :class:`frozenset`, or an instance of a subtype."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:112
|
||||
msgid "Macro form of :c:func:`PySet_Size` without error checking."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:117
|
||||
msgid ""
|
||||
"Return 1 if found, 0 if not found, and -1 if an error is encountered. "
|
||||
"Unlike the Python :meth:`__contains__` method, this function does not "
|
||||
"automatically convert unhashable sets into temporary frozensets. Raise a :"
|
||||
"exc:`TypeError` if the *key* is unhashable. Raise :exc:`PyExc_SystemError` "
|
||||
"if *anyset* is not a :class:`set`, :class:`frozenset`, or an instance of a "
|
||||
"subtype."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:126
|
||||
msgid ""
|
||||
"Add *key* to a :class:`set` instance. Also works with :class:`frozenset` "
|
||||
"instances (like :c:func:`PyTuple_SetItem` it can be used to fill-in the "
|
||||
"values of brand new frozensets before they are exposed to other code). "
|
||||
"Return 0 on success or -1 on failure. Raise a :exc:`TypeError` if the *key* "
|
||||
"is unhashable. Raise a :exc:`MemoryError` if there is no room to grow. "
|
||||
"Raise a :exc:`SystemError` if *set* is not an instance of :class:`set` or "
|
||||
"its subtype."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:135
|
||||
msgid ""
|
||||
"The following functions are available for instances of :class:`set` or its "
|
||||
"subtypes but not for instances of :class:`frozenset` or its subtypes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:141
|
||||
msgid ""
|
||||
"Return 1 if found and removed, 0 if not found (no action taken), and -1 if "
|
||||
"an error is encountered. Does not raise :exc:`KeyError` for missing keys. "
|
||||
"Raise a :exc:`TypeError` if the *key* is unhashable. Unlike the Python :"
|
||||
"meth:`~set.discard` method, this function does not automatically convert "
|
||||
"unhashable sets into temporary frozensets. Raise :exc:`PyExc_SystemError` if "
|
||||
"*set* is not an instance of :class:`set` or its subtype."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:151
|
||||
msgid ""
|
||||
"Return a new reference to an arbitrary object in the *set*, and removes the "
|
||||
"object from the *set*. Return *NULL* on failure. Raise :exc:`KeyError` if "
|
||||
"the set is empty. Raise a :exc:`SystemError` if *set* is not an instance of :"
|
||||
"class:`set` or its subtype."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:159
|
||||
msgid "Empty an existing set of all elements."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/set.rst:164
|
||||
msgid "Clear the free list. Return the total number of freed items."
|
||||
msgstr ""
|
|
@ -0,0 +1,76 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/slice.rst:6
|
||||
msgid "Slice Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/slice.rst:11
|
||||
msgid ""
|
||||
"The type object for slice objects. This is the same as :class:`slice` in "
|
||||
"the Python layer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/slice.rst:17
|
||||
msgid "Return true if *ob* is a slice object; *ob* must not be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/slice.rst:22
|
||||
msgid ""
|
||||
"Return a new slice object with the given values. The *start*, *stop*, and "
|
||||
"*step* parameters are used as the values of the slice object attributes of "
|
||||
"the same names. Any of the values may be *NULL*, in which case the ``None`` "
|
||||
"will be used for the corresponding attribute. Return *NULL* if the new "
|
||||
"object could not be allocated."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/slice.rst:31
|
||||
msgid ""
|
||||
"Retrieve the start, stop and step indices from the slice object *slice*, "
|
||||
"assuming a sequence of length *length*. Treats indices greater than *length* "
|
||||
"as errors."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/slice.rst:35
|
||||
msgid ""
|
||||
"Returns 0 on success and -1 on error with no exception set (unless one of "
|
||||
"the indices was not :const:`None` and failed to be converted to an integer, "
|
||||
"in which case -1 is returned with an exception set)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/slice.rst:39
|
||||
msgid "You probably do not want to use this function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/slice.rst:41 ../Doc/c-api/slice.rst:56
|
||||
msgid ""
|
||||
"The parameter type for the *slice* parameter was ``PySliceObject*`` before."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/slice.rst:48
|
||||
msgid ""
|
||||
"Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, "
|
||||
"stop, and step indices from the slice object *slice* assuming a sequence of "
|
||||
"length *length*, and store the length of the slice in *slicelength*. Out of "
|
||||
"bounds indices are clipped in a manner consistent with the handling of "
|
||||
"normal slices."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/slice.rst:54
|
||||
msgid "Returns 0 on success and -1 on error with exception set."
|
||||
msgstr ""
|
|
@ -0,0 +1,68 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/stable.rst:7
|
||||
msgid "Stable Application Binary Interface"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/stable.rst:9
|
||||
msgid ""
|
||||
"Traditionally, the C API of Python will change with every release. Most "
|
||||
"changes will be source-compatible, typically by only adding API, rather than "
|
||||
"changing existing API or removing API (although some interfaces do get "
|
||||
"removed after being deprecated first)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/stable.rst:14
|
||||
msgid ""
|
||||
"Unfortunately, the API compatibility does not extend to binary compatibility "
|
||||
"(the ABI). The reason is primarily the evolution of struct definitions, "
|
||||
"where addition of a new field, or changing the type of a field, might not "
|
||||
"break the API, but can break the ABI. As a consequence, extension modules "
|
||||
"need to be recompiled for every Python release (although an exception is "
|
||||
"possible on Unix when none of the affected interfaces are used). In "
|
||||
"addition, on Windows, extension modules link with a specific pythonXY.dll "
|
||||
"and need to be recompiled to link with a newer one."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/stable.rst:23
|
||||
msgid ""
|
||||
"Since Python 3.2, a subset of the API has been declared to guarantee a "
|
||||
"stable ABI. Extension modules wishing to use this API (called \"limited API"
|
||||
"\") need to define ``Py_LIMITED_API``. A number of interpreter details then "
|
||||
"become hidden from the extension module; in return, a module is built that "
|
||||
"works on any 3.x version (x>=2) without recompilation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/stable.rst:29
|
||||
msgid ""
|
||||
"In some cases, the stable ABI needs to be extended with new functions. "
|
||||
"Extension modules wishing to use these new APIs need to set "
|
||||
"``Py_LIMITED_API`` to the ``PY_VERSION_HEX`` value (see :ref:"
|
||||
"`apiabiversion`) of the minimum Python version they want to support (e.g. "
|
||||
"``0x03030000`` for Python 3.3). Such modules will work on all subsequent "
|
||||
"Python releases, but fail to load (because of missing symbols) on the older "
|
||||
"releases."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/stable.rst:36
|
||||
msgid ""
|
||||
"As of Python 3.2, the set of functions available to the limited API is "
|
||||
"documented in :pep:`384`. In the C API documentation, API elements that are "
|
||||
"not part of the limited API are marked as \"Not part of the limited API.\""
|
||||
msgstr ""
|
|
@ -0,0 +1,491 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:6
|
||||
msgid "Common Object Structures"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:8
|
||||
msgid ""
|
||||
"There are a large number of structures which are used in the definition of "
|
||||
"object types for Python. This section describes these structures and how "
|
||||
"they are used."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:12
|
||||
msgid ""
|
||||
"All Python objects ultimately share a small number of fields at the "
|
||||
"beginning of the object's representation in memory. These are represented "
|
||||
"by the :c:type:`PyObject` and :c:type:`PyVarObject` types, which are "
|
||||
"defined, in turn, by the expansions of some macros also used, whether "
|
||||
"directly or indirectly, in the definition of all other Python objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:21
|
||||
msgid ""
|
||||
"All object types are extensions of this type. This is a type which contains "
|
||||
"the information Python needs to treat a pointer to an object as an object. "
|
||||
"In a normal \"release\" build, it contains only the object's reference count "
|
||||
"and a pointer to the corresponding type object. Nothing is actually declared "
|
||||
"to be a :c:type:`PyObject`, but every pointer to a Python object can be cast "
|
||||
"to a :c:type:`PyObject*`. Access to the members must be done by using the "
|
||||
"macros :c:macro:`Py_REFCNT` and :c:macro:`Py_TYPE`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:33
|
||||
msgid ""
|
||||
"This is an extension of :c:type:`PyObject` that adds the :attr:`ob_size` "
|
||||
"field. This is only used for objects that have some notion of *length*. "
|
||||
"This type does not often appear in the Python/C API. Access to the members "
|
||||
"must be done by using the macros :c:macro:`Py_REFCNT`, :c:macro:`Py_TYPE`, "
|
||||
"and :c:macro:`Py_SIZE`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:42
|
||||
msgid ""
|
||||
"This is a macro used when declaring new types which represent objects "
|
||||
"without a varying length. The PyObject_HEAD macro expands to::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:47
|
||||
msgid "See documentation of :c:type:`PyObject` above."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:52
|
||||
msgid ""
|
||||
"This is a macro used when declaring new types which represent objects with a "
|
||||
"length that varies from instance to instance. The PyObject_VAR_HEAD macro "
|
||||
"expands to::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:58
|
||||
msgid "See documentation of :c:type:`PyVarObject` above."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:63
|
||||
msgid ""
|
||||
"This macro is used to access the :attr:`ob_type` member of a Python object. "
|
||||
"It expands to::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:71
|
||||
msgid ""
|
||||
"This macro is used to access the :attr:`ob_refcnt` member of a Python "
|
||||
"object. It expands to::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:80
|
||||
msgid ""
|
||||
"This macro is used to access the :attr:`ob_size` member of a Python object. "
|
||||
"It expands to::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:88
|
||||
msgid ""
|
||||
"This is a macro which expands to initialization values for a new :c:type:"
|
||||
"`PyObject` type. This macro expands to::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:97
|
||||
msgid ""
|
||||
"This is a macro which expands to initialization values for a new :c:type:"
|
||||
"`PyVarObject` type, including the :attr:`ob_size` field. This macro expands "
|
||||
"to::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:107
|
||||
msgid ""
|
||||
"Type of the functions used to implement most Python callables in C. "
|
||||
"Functions of this type take two :c:type:`PyObject\\*` parameters and return "
|
||||
"one such value. If the return value is *NULL*, an exception shall have been "
|
||||
"set. If not *NULL*, the return value is interpreted as the return value of "
|
||||
"the function as exposed in Python. The function must return a new reference."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:117
|
||||
msgid ""
|
||||
"Type of the functions used to implement Python callables in C that take "
|
||||
"keyword arguments: they take three :c:type:`PyObject\\*` parameters and "
|
||||
"return one such value. See :c:type:`PyCFunction` above for the meaning of "
|
||||
"the return value."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:125
|
||||
msgid ""
|
||||
"Structure used to describe a method of an extension type. This structure "
|
||||
"has four fields:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:129 ../Doc/c-api/structures.rst:241
|
||||
msgid "Field"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:129 ../Doc/c-api/structures.rst:241
|
||||
msgid "C Type"
|
||||
msgstr "Type C"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:129 ../Doc/c-api/structures.rst:241
|
||||
msgid "Meaning"
|
||||
msgstr "Signification"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:131
|
||||
msgid ":attr:`ml_name`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:131 ../Doc/c-api/structures.rst:139
|
||||
#: ../Doc/c-api/structures.rst:243 ../Doc/c-api/structures.rst:256
|
||||
#: ../Doc/c-api/structures.rst:272
|
||||
msgid "char \\*"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:131
|
||||
msgid "name of the method"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:133
|
||||
msgid ":attr:`ml_meth`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:133
|
||||
msgid "PyCFunction"
|
||||
msgstr "PyCFunction"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:133
|
||||
msgid "pointer to the C implementation"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:136
|
||||
msgid ":attr:`ml_flags`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:136 ../Doc/c-api/structures.rst:245
|
||||
#: ../Doc/c-api/structures.rst:252 ../Doc/c-api/structures.rst:268
|
||||
msgid "int"
|
||||
msgstr "int"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:136
|
||||
msgid "flag bits indicating how the call should be constructed"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:139
|
||||
msgid ":attr:`ml_doc`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:139 ../Doc/c-api/structures.rst:256
|
||||
msgid "points to the contents of the docstring"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:143
|
||||
msgid ""
|
||||
"The :attr:`ml_meth` is a C function pointer. The functions may be of "
|
||||
"different types, but they always return :c:type:`PyObject\\*`. If the "
|
||||
"function is not of the :c:type:`PyCFunction`, the compiler will require a "
|
||||
"cast in the method table. Even though :c:type:`PyCFunction` defines the "
|
||||
"first parameter as :c:type:`PyObject\\*`, it is common that the method "
|
||||
"implementation uses the specific C type of the *self* object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:150
|
||||
msgid ""
|
||||
"The :attr:`ml_flags` field is a bitfield which can include the following "
|
||||
"flags. The individual flags indicate either a calling convention or a "
|
||||
"binding convention. Of the calling convention flags, only :const:"
|
||||
"`METH_VARARGS` and :const:`METH_KEYWORDS` can be combined (but note that :"
|
||||
"const:`METH_KEYWORDS` alone is equivalent to ``METH_VARARGS | "
|
||||
"METH_KEYWORDS``). Any of the calling convention flags can be combined with a "
|
||||
"binding flag."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:160
|
||||
msgid ""
|
||||
"This is the typical calling convention, where the methods have the type :c:"
|
||||
"type:`PyCFunction`. The function expects two :c:type:`PyObject\\*` values. "
|
||||
"The first one is the *self* object for methods; for module functions, it is "
|
||||
"the module object. The second parameter (often called *args*) is a tuple "
|
||||
"object representing all arguments. This parameter is typically processed "
|
||||
"using :c:func:`PyArg_ParseTuple` or :c:func:`PyArg_UnpackTuple`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:170
|
||||
msgid ""
|
||||
"Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`. "
|
||||
"The function expects three parameters: *self*, *args*, and a dictionary of "
|
||||
"all the keyword arguments. The flag is typically combined with :const:"
|
||||
"`METH_VARARGS`, and the parameters are typically processed using :c:func:"
|
||||
"`PyArg_ParseTupleAndKeywords`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:179
|
||||
msgid ""
|
||||
"Methods without parameters don't need to check whether arguments are given "
|
||||
"if they are listed with the :const:`METH_NOARGS` flag. They need to be of "
|
||||
"type :c:type:`PyCFunction`. The first parameter is typically named *self* "
|
||||
"and will hold a reference to the module or object instance. In all cases "
|
||||
"the second parameter will be *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:188
|
||||
msgid ""
|
||||
"Methods with a single object argument can be listed with the :const:`METH_O` "
|
||||
"flag, instead of invoking :c:func:`PyArg_ParseTuple` with a ``\"O\"`` "
|
||||
"argument. They have the type :c:type:`PyCFunction`, with the *self* "
|
||||
"parameter, and a :c:type:`PyObject\\*` parameter representing the single "
|
||||
"argument."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:194
|
||||
msgid ""
|
||||
"These two constants are not used to indicate the calling convention but the "
|
||||
"binding when use with methods of classes. These may not be used for "
|
||||
"functions defined for modules. At most one of these flags may be set for "
|
||||
"any given method."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:204
|
||||
msgid ""
|
||||
"The method will be passed the type object as the first parameter rather than "
|
||||
"an instance of the type. This is used to create *class methods*, similar to "
|
||||
"what is created when using the :func:`classmethod` built-in function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:214
|
||||
msgid ""
|
||||
"The method will be passed *NULL* as the first parameter rather than an "
|
||||
"instance of the type. This is used to create *static methods*, similar to "
|
||||
"what is created when using the :func:`staticmethod` built-in function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:218
|
||||
msgid ""
|
||||
"One other constant controls whether a method is loaded in place of another "
|
||||
"definition with the same method name."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:224
|
||||
msgid ""
|
||||
"The method will be loaded in place of existing definitions. Without "
|
||||
"*METH_COEXIST*, the default is to skip repeated definitions. Since slot "
|
||||
"wrappers are loaded before the method table, the existence of a "
|
||||
"*sq_contains* slot, for example, would generate a wrapped method named :meth:"
|
||||
"`__contains__` and preclude the loading of a corresponding PyCFunction with "
|
||||
"the same name. With the flag defined, the PyCFunction will be loaded in "
|
||||
"place of the wrapper object and will co-exist with the slot. This is "
|
||||
"helpful because calls to PyCFunctions are optimized more than wrapper object "
|
||||
"calls."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:237
|
||||
msgid ""
|
||||
"Structure which describes an attribute of a type which corresponds to a C "
|
||||
"struct member. Its fields are:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:243
|
||||
msgid ":attr:`name`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:243
|
||||
msgid "name of the member"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:245
|
||||
msgid ":attr:`type`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:245
|
||||
msgid "the type of the member in the C struct"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:248
|
||||
msgid ":attr:`offset`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:248 ../Doc/c-api/structures.rst:284
|
||||
msgid "Py_ssize_t"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:248
|
||||
msgid ""
|
||||
"the offset in bytes that the member is located on the type's object struct"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:252
|
||||
msgid ":attr:`flags`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:252
|
||||
msgid "flag bits indicating if the field should be read-only or writable"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:256
|
||||
msgid ":attr:`doc`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:260
|
||||
msgid ""
|
||||
":attr:`type` can be one of many ``T_`` macros corresponding to various C "
|
||||
"types. When the member is accessed in Python, it will be converted to the "
|
||||
"equivalent Python type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:265
|
||||
msgid "Macro name"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:265
|
||||
msgid "C type"
|
||||
msgstr "Type C"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:267
|
||||
msgid "T_SHORT"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:267
|
||||
msgid "short"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:268
|
||||
msgid "T_INT"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:269
|
||||
msgid "T_LONG"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:269
|
||||
msgid "long"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:270
|
||||
msgid "T_FLOAT"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:270
|
||||
msgid "float"
|
||||
msgstr "float"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:271
|
||||
msgid "T_DOUBLE"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:271
|
||||
msgid "double"
|
||||
msgstr "double"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:272
|
||||
msgid "T_STRING"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:273
|
||||
msgid "T_OBJECT"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:273 ../Doc/c-api/structures.rst:274
|
||||
msgid "PyObject \\*"
|
||||
msgstr "PyObject \\*"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:274
|
||||
msgid "T_OBJECT_EX"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:275
|
||||
msgid "T_CHAR"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:275 ../Doc/c-api/structures.rst:276
|
||||
#: ../Doc/c-api/structures.rst:281
|
||||
msgid "char"
|
||||
msgstr "char"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:276
|
||||
msgid "T_BYTE"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:277
|
||||
msgid "T_UBYTE"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:277
|
||||
msgid "unsigned char"
|
||||
msgstr "unsigned char"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:278
|
||||
msgid "T_UINT"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:278
|
||||
msgid "unsigned int"
|
||||
msgstr "unsigned int"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:279
|
||||
msgid "T_USHORT"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:279
|
||||
msgid "unsigned short"
|
||||
msgstr "unsigned short"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:280
|
||||
msgid "T_ULONG"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:280
|
||||
msgid "unsigned long"
|
||||
msgstr "unsigned long"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:281
|
||||
msgid "T_BOOL"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:282
|
||||
msgid "T_LONGLONG"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:282
|
||||
msgid "long long"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:283
|
||||
msgid "T_ULONGLONG"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:283
|
||||
msgid "unsigned long long"
|
||||
msgstr "unsigned long long"
|
||||
|
||||
#: ../Doc/c-api/structures.rst:284
|
||||
msgid "T_PYSSIZET"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:287
|
||||
msgid ""
|
||||
":c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` differ in that :c:macro:"
|
||||
"`T_OBJECT` returns ``None`` if the member is *NULL* and :c:macro:"
|
||||
"`T_OBJECT_EX` raises an :exc:`AttributeError`. Try to use :c:macro:"
|
||||
"`T_OBJECT_EX` over :c:macro:`T_OBJECT` because :c:macro:`T_OBJECT_EX` "
|
||||
"handles use of the :keyword:`del` statement on that attribute more correctly "
|
||||
"than :c:macro:`T_OBJECT`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/structures.rst:294
|
||||
msgid ""
|
||||
":attr:`flags` can be 0 for write and read access or :c:macro:`READONLY` for "
|
||||
"read-only access. Using :c:macro:`T_STRING` for :attr:`type` implies :c:"
|
||||
"macro:`READONLY`. Only :c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` "
|
||||
"members can be deleted. (They are set to *NULL*)."
|
||||
msgstr ""
|
|
@ -0,0 +1,281 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/sys.rst:6
|
||||
msgid "Operating System Utilities"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:10
|
||||
msgid ""
|
||||
"Return the file system representation for *path*. If the object is a :class:"
|
||||
"`str` or :class:`bytes` object, then its reference count is incremented. If "
|
||||
"the object implements the :class:`os.PathLike` interface, then :meth:`~os."
|
||||
"PathLike.__fspath__` is returned as long as it is a :class:`str` or :class:"
|
||||
"`bytes` object. Otherwise :exc:`TypeError` is raised and ``NULL`` is "
|
||||
"returned."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:22
|
||||
msgid ""
|
||||
"Return true (nonzero) if the standard I/O file *fp* with name *filename* is "
|
||||
"deemed interactive. This is the case for files for which "
|
||||
"``isatty(fileno(fp))`` is true. If the global flag :c:data:"
|
||||
"`Py_InteractiveFlag` is true, this function also returns true if the "
|
||||
"*filename* pointer is *NULL* or if the name is equal to one of the strings "
|
||||
"``'<stdin>'`` or ``'???'``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:31
|
||||
msgid ""
|
||||
"Function to update some internal state after a process fork; this should be "
|
||||
"called in the new process if the Python interpreter will continue to be "
|
||||
"used. If a new executable is loaded into the new process, this function does "
|
||||
"not need to be called."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:39
|
||||
msgid ""
|
||||
"Return true when the interpreter runs out of stack space. This is a "
|
||||
"reliable check, but is only available when :const:`USE_STACKCHECK` is "
|
||||
"defined (currently on Windows using the Microsoft Visual C++ compiler). :"
|
||||
"const:`USE_STACKCHECK` will be defined automatically; you should never "
|
||||
"change the definition in your own code."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:48
|
||||
msgid ""
|
||||
"Return the current signal handler for signal *i*. This is a thin wrapper "
|
||||
"around either :c:func:`sigaction` or :c:func:`signal`. Do not call those "
|
||||
"functions directly! :c:type:`PyOS_sighandler_t` is a typedef alias for :c:"
|
||||
"type:`void (\\*)(int)`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:56
|
||||
msgid ""
|
||||
"Set the signal handler for signal *i* to be *h*; return the old signal "
|
||||
"handler. This is a thin wrapper around either :c:func:`sigaction` or :c:func:"
|
||||
"`signal`. Do not call those functions directly! :c:type:"
|
||||
"`PyOS_sighandler_t` is a typedef alias for :c:type:`void (\\*)(int)`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:63
|
||||
msgid ""
|
||||
"Decode a byte string from the locale encoding with the :ref:`surrogateescape "
|
||||
"error handler <surrogateescape>`: undecodable bytes are decoded as "
|
||||
"characters in range U+DC80..U+DCFF. If a byte sequence can be decoded as a "
|
||||
"surrogate character, escape the bytes using the surrogateescape error "
|
||||
"handler instead of decoding them."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:69
|
||||
msgid ""
|
||||
"Return a pointer to a newly allocated wide character string, use :c:func:"
|
||||
"`PyMem_RawFree` to free the memory. If size is not ``NULL``, write the "
|
||||
"number of wide characters excluding the null character into ``*size``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:73
|
||||
msgid ""
|
||||
"Return ``NULL`` on decoding error or memory allocation error. If *size* is "
|
||||
"not ``NULL``, ``*size`` is set to ``(size_t)-1`` on memory error or set to "
|
||||
"``(size_t)-2`` on decoding error."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:77
|
||||
msgid ""
|
||||
"Decoding errors should never happen, unless there is a bug in the C library."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:80
|
||||
msgid ""
|
||||
"Use the :c:func:`Py_EncodeLocale` function to encode the character string "
|
||||
"back to a byte string."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:85
|
||||
msgid ""
|
||||
"The :c:func:`PyUnicode_DecodeFSDefaultAndSize` and :c:func:"
|
||||
"`PyUnicode_DecodeLocaleAndSize` functions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:93
|
||||
msgid ""
|
||||
"Encode a wide character string to the locale encoding with the :ref:"
|
||||
"`surrogateescape error handler <surrogateescape>`: surrogate characters in "
|
||||
"the range U+DC80..U+DCFF are converted to bytes 0x80..0xFF."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:97
|
||||
msgid ""
|
||||
"Return a pointer to a newly allocated byte string, use :c:func:`PyMem_Free` "
|
||||
"to free the memory. Return ``NULL`` on encoding error or memory allocation "
|
||||
"error"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:101
|
||||
msgid ""
|
||||
"If error_pos is not ``NULL``, ``*error_pos`` is set to the index of the "
|
||||
"invalid character on encoding error, or set to ``(size_t)-1`` otherwise."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:104
|
||||
msgid ""
|
||||
"Use the :c:func:`Py_DecodeLocale` function to decode the bytes string back "
|
||||
"to a wide character string."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:109
|
||||
msgid ""
|
||||
"The :c:func:`PyUnicode_EncodeFSDefault` and :c:func:`PyUnicode_EncodeLocale` "
|
||||
"functions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:118
|
||||
msgid "System Functions"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:120
|
||||
msgid ""
|
||||
"These are utility functions that make functionality from the :mod:`sys` "
|
||||
"module accessible to C code. They all work with the current interpreter "
|
||||
"thread's :mod:`sys` module's dict, which is contained in the internal thread "
|
||||
"state structure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:126
|
||||
msgid ""
|
||||
"Return the object *name* from the :mod:`sys` module or *NULL* if it does not "
|
||||
"exist, without setting an exception."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:131
|
||||
msgid ""
|
||||
"Set *name* in the :mod:`sys` module to *v* unless *v* is *NULL*, in which "
|
||||
"case *name* is deleted from the sys module. Returns ``0`` on success, ``-1`` "
|
||||
"on error."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:137
|
||||
msgid "Reset :data:`sys.warnoptions` to an empty list."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:141
|
||||
msgid "Append *s* to :data:`sys.warnoptions`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:145
|
||||
msgid "Append *unicode* to :data:`sys.warnoptions`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:149
|
||||
msgid ""
|
||||
"Set :data:`sys.path` to a list object of paths found in *path* which should "
|
||||
"be a list of paths separated with the platform's search path delimiter (``:"
|
||||
"`` on Unix, ``;`` on Windows)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:155
|
||||
msgid ""
|
||||
"Write the output string described by *format* to :data:`sys.stdout`. No "
|
||||
"exceptions are raised, even if truncation occurs (see below)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:158
|
||||
msgid ""
|
||||
"*format* should limit the total size of the formatted output string to 1000 "
|
||||
"bytes or less -- after 1000 bytes, the output string is truncated. In "
|
||||
"particular, this means that no unrestricted \"%s\" formats should occur; "
|
||||
"these should be limited using \"%.<N>s\" where <N> is a decimal number "
|
||||
"calculated so that <N> plus the maximum size of other formatted text does "
|
||||
"not exceed 1000 bytes. Also watch out for \"%f\", which can print hundreds "
|
||||
"of digits for very large numbers."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:166
|
||||
msgid ""
|
||||
"If a problem occurs, or :data:`sys.stdout` is unset, the formatted message "
|
||||
"is written to the real (C level) *stdout*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:171
|
||||
msgid ""
|
||||
"As :c:func:`PySys_WriteStdout`, but write to :data:`sys.stderr` or *stderr* "
|
||||
"instead."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:176
|
||||
msgid ""
|
||||
"Function similar to PySys_WriteStdout() but format the message using :c:func:"
|
||||
"`PyUnicode_FromFormatV` and don't truncate the message to an arbitrary "
|
||||
"length."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:184
|
||||
msgid ""
|
||||
"As :c:func:`PySys_FormatStdout`, but write to :data:`sys.stderr` or *stderr* "
|
||||
"instead."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:191
|
||||
msgid ""
|
||||
"Parse *s* as a set of :option:`-X` options and add them to the current "
|
||||
"options mapping as returned by :c:func:`PySys_GetXOptions`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:198
|
||||
msgid ""
|
||||
"Return the current dictionary of :option:`-X` options, similarly to :data:"
|
||||
"`sys._xoptions`. On error, *NULL* is returned and an exception is set."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:208
|
||||
msgid "Process Control"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:215
|
||||
msgid ""
|
||||
"Print a fatal error message and kill the process. No cleanup is performed. "
|
||||
"This function should only be invoked when a condition is detected that would "
|
||||
"make it dangerous to continue using the Python interpreter; e.g., when the "
|
||||
"object administration appears to be corrupted. On Unix, the standard C "
|
||||
"library function :c:func:`abort` is called which will attempt to produce a :"
|
||||
"file:`core` file."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:229
|
||||
msgid ""
|
||||
"Exit the current process. This calls :c:func:`Py_FinalizeEx` and then calls "
|
||||
"the standard C library function ``exit(status)``. If :c:func:"
|
||||
"`Py_FinalizeEx` indicates an error, the exit status is set to 120."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:233
|
||||
msgid "Errors from finalization no longer ignored."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/sys.rst:243
|
||||
msgid ""
|
||||
"Register a cleanup function to be called by :c:func:`Py_FinalizeEx`. The "
|
||||
"cleanup function will be called with no arguments and should return no "
|
||||
"value. At most 32 cleanup functions can be registered. When the "
|
||||
"registration is successful, :c:func:`Py_AtExit` returns ``0``; on failure, "
|
||||
"it returns ``-1``. The cleanup function registered last is called first. "
|
||||
"Each cleanup function will be called at most once. Since Python's internal "
|
||||
"finalization will have completed before the cleanup function, no Python APIs "
|
||||
"should be called by *func*."
|
||||
msgstr ""
|
|
@ -0,0 +1,257 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:6
|
||||
msgid "Tuple Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:13
|
||||
msgid "This subtype of :c:type:`PyObject` represents a Python tuple object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:18
|
||||
msgid ""
|
||||
"This instance of :c:type:`PyTypeObject` represents the Python tuple type; it "
|
||||
"is the same object as :class:`tuple` in the Python layer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:24
|
||||
msgid ""
|
||||
"Return true if *p* is a tuple object or an instance of a subtype of the "
|
||||
"tuple type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:30
|
||||
msgid ""
|
||||
"Return true if *p* is a tuple object, but not an instance of a subtype of "
|
||||
"the tuple type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:36
|
||||
msgid "Return a new tuple object of size *len*, or *NULL* on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:41
|
||||
msgid ""
|
||||
"Return a new tuple object of size *n*, or *NULL* on failure. The tuple "
|
||||
"values are initialized to the subsequent *n* C arguments pointing to Python "
|
||||
"objects. ``PyTuple_Pack(2, a, b)`` is equivalent to "
|
||||
"``Py_BuildValue(\"(OO)\", a, b)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:48
|
||||
msgid "Take a pointer to a tuple object, and return the size of that tuple."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:53
|
||||
msgid ""
|
||||
"Return the size of the tuple *p*, which must be non-*NULL* and point to a "
|
||||
"tuple; no error checking is performed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:59
|
||||
msgid ""
|
||||
"Return the object at position *pos* in the tuple pointed to by *p*. If "
|
||||
"*pos* is out of bounds, return *NULL* and sets an :exc:`IndexError` "
|
||||
"exception."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:65
|
||||
msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:70
|
||||
msgid ""
|
||||
"Take a slice of the tuple pointed to by *p* from *low* to *high* and return "
|
||||
"it as a new tuple."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:76
|
||||
msgid ""
|
||||
"Insert a reference to object *o* at position *pos* of the tuple pointed to "
|
||||
"by *p*. Return ``0`` on success."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:81 ../Doc/c-api/tuple.rst:91
|
||||
#: ../Doc/c-api/tuple.rst:209 ../Doc/c-api/tuple.rst:218
|
||||
msgid "This function \"steals\" a reference to *o*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:86
|
||||
msgid ""
|
||||
"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should "
|
||||
"*only* be used to fill in brand new tuples."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:96
|
||||
msgid ""
|
||||
"Can be used to resize a tuple. *newsize* will be the new length of the "
|
||||
"tuple. Because tuples are *supposed* to be immutable, this should only be "
|
||||
"used if there is only one reference to the object. Do *not* use this if the "
|
||||
"tuple may already be known to some other part of the code. The tuple will "
|
||||
"always grow or shrink at the end. Think of this as destroying the old tuple "
|
||||
"and creating a new one, only more efficiently. Returns ``0`` on success. "
|
||||
"Client code should never assume that the resulting value of ``*p`` will be "
|
||||
"the same as before calling this function. If the object referenced by ``*p`` "
|
||||
"is replaced, the original ``*p`` is destroyed. On failure, returns ``-1`` "
|
||||
"and sets ``*p`` to *NULL*, and raises :exc:`MemoryError` or :exc:"
|
||||
"`SystemError`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:110
|
||||
msgid "Clear the free list. Return the total number of freed items."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:114
|
||||
msgid "Struct Sequence Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:116
|
||||
msgid ""
|
||||
"Struct sequence objects are the C equivalent of :func:`~collections."
|
||||
"namedtuple` objects, i.e. a sequence whose items can also be accessed "
|
||||
"through attributes. To create a struct sequence, you first have to create a "
|
||||
"specific struct sequence type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:123
|
||||
msgid ""
|
||||
"Create a new struct sequence type from the data in *desc*, described below. "
|
||||
"Instances of the resulting type can be created with :c:func:"
|
||||
"`PyStructSequence_New`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:129
|
||||
msgid "Initializes a struct sequence type *type* from *desc* in place."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:134
|
||||
msgid ""
|
||||
"The same as ``PyStructSequence_InitType``, but returns ``0`` on success and "
|
||||
"``-1`` on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:142
|
||||
msgid "Contains the meta information of a struct sequence type to create."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:145 ../Doc/c-api/tuple.rst:168
|
||||
msgid "Field"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:145 ../Doc/c-api/tuple.rst:168
|
||||
msgid "C Type"
|
||||
msgstr "Type C"
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:145 ../Doc/c-api/tuple.rst:168
|
||||
msgid "Meaning"
|
||||
msgstr "Signification"
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:147 ../Doc/c-api/tuple.rst:170
|
||||
msgid "``name``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:147 ../Doc/c-api/tuple.rst:149
|
||||
#: ../Doc/c-api/tuple.rst:170 ../Doc/c-api/tuple.rst:175
|
||||
msgid "``char *``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:147
|
||||
msgid "name of the struct sequence type"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:149 ../Doc/c-api/tuple.rst:175
|
||||
msgid "``doc``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:149
|
||||
msgid "pointer to docstring for the type or NULL to omit"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:152
|
||||
msgid "``fields``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:152
|
||||
msgid "``PyStructSequence_Field *``"
|
||||
msgstr "``PyStructSequence_Field *``"
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:152
|
||||
msgid "pointer to *NULL*-terminated array with field names of the new type"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:155
|
||||
msgid "``n_in_sequence``"
|
||||
msgstr "``n_in_sequence``"
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:155
|
||||
msgid "``int``"
|
||||
msgstr "``int``"
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:155
|
||||
msgid "number of fields visible to the Python side (if used as tuple)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:162
|
||||
msgid ""
|
||||
"Describes a field of a struct sequence. As a struct sequence is modeled as a "
|
||||
"tuple, all fields are typed as :c:type:`PyObject\\*`. The index in the :"
|
||||
"attr:`fields` array of the :c:type:`PyStructSequence_Desc` determines which "
|
||||
"field of the struct sequence is described."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:170
|
||||
msgid ""
|
||||
"name for the field or *NULL* to end the list of named fields, set to "
|
||||
"PyStructSequence_UnnamedField to leave unnamed"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:175
|
||||
msgid "field docstring or *NULL* to omit"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:181
|
||||
msgid "Special value for a field name to leave it unnamed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:186
|
||||
msgid ""
|
||||
"Creates an instance of *type*, which must have been created with :c:func:"
|
||||
"`PyStructSequence_NewType`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:192
|
||||
msgid ""
|
||||
"Return the object at position *pos* in the struct sequence pointed to by "
|
||||
"*p*. No bounds checking is performed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:198
|
||||
msgid "Macro equivalent of :c:func:`PyStructSequence_GetItem`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:203
|
||||
msgid ""
|
||||
"Sets the field at index *pos* of the struct sequence *p* to value *o*. "
|
||||
"Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand "
|
||||
"new instances."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/tuple.rst:214
|
||||
msgid "Macro equivalent of :c:func:`PyStructSequence_SetItem`."
|
||||
msgstr ""
|
|
@ -0,0 +1,129 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/type.rst:6
|
||||
msgid "Type Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:13
|
||||
msgid "The C structure of the objects used to describe built-in types."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:18
|
||||
msgid ""
|
||||
"This is the type object for type objects; it is the same object as :class:"
|
||||
"`type` in the Python layer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:24
|
||||
msgid ""
|
||||
"Return true if the object *o* is a type object, including instances of types "
|
||||
"derived from the standard type object. Return false in all other cases."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:30
|
||||
msgid ""
|
||||
"Return true if the object *o* is a type object, but not a subtype of the "
|
||||
"standard type object. Return false in all other cases."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:36
|
||||
msgid "Clear the internal lookup cache. Return the current version tag."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:40
|
||||
msgid ""
|
||||
"Return the :c:member:`~PyTypeObject.tp_flags` member of *type*. This "
|
||||
"function is primarily meant for use with `Py_LIMITED_API`; the individual "
|
||||
"flag bits are guaranteed to be stable across Python releases, but access to :"
|
||||
"c:member:`~PyTypeObject.tp_flags` itself is not part of the limited API."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:50
|
||||
msgid ""
|
||||
"Invalidate the internal lookup cache for the type and all of its subtypes. "
|
||||
"This function must be called after any manual modification of the attributes "
|
||||
"or base classes of the type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:57
|
||||
msgid ""
|
||||
"Return true if the type object *o* sets the feature *feature*. Type "
|
||||
"features are denoted by single bit flags."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:63
|
||||
msgid ""
|
||||
"Return true if the type object includes support for the cycle detector; this "
|
||||
"tests the type flag :const:`Py_TPFLAGS_HAVE_GC`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:69
|
||||
msgid "Return true if *a* is a subtype of *b*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:71
|
||||
msgid ""
|
||||
"This function only checks for actual subtypes, which means that :meth:"
|
||||
"`~class.__subclasscheck__` is not called on *b*. Call :c:func:"
|
||||
"`PyObject_IsSubclass` to do the same check that :func:`issubclass` would do."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:79
|
||||
msgid ""
|
||||
"Generic handler for the :c:member:`~PyTypeObject.tp_alloc` slot of a type "
|
||||
"object. Use Python's default memory allocation mechanism to allocate a new "
|
||||
"instance and initialize all its contents to *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:85
|
||||
msgid ""
|
||||
"Generic handler for the :c:member:`~PyTypeObject.tp_new` slot of a type "
|
||||
"object. Create a new instance using the type's :c:member:`~PyTypeObject."
|
||||
"tp_alloc` slot."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:90
|
||||
msgid ""
|
||||
"Finalize a type object. This should be called on all type objects to finish "
|
||||
"their initialization. This function is responsible for adding inherited "
|
||||
"slots from a type's base class. Return ``0`` on success, or return ``-1`` "
|
||||
"and sets an exception on error."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:97
|
||||
msgid ""
|
||||
"Creates and returns a heap type object from the *spec* passed to the "
|
||||
"function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:101
|
||||
msgid ""
|
||||
"Creates and returns a heap type object from the *spec*. In addition to that, "
|
||||
"the created heap type contains all types contained by the *bases* tuple as "
|
||||
"base types. This allows the caller to reference other heap types as base "
|
||||
"types."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/type.rst:109
|
||||
msgid ""
|
||||
"Return the function pointer stored in the given slot. If the result is "
|
||||
"*NULL*, this indicates that either the slot is *NULL*, or that the function "
|
||||
"was called with invalid parameters. Callers will typically cast the result "
|
||||
"pointer into the appropriate function type."
|
||||
msgstr ""
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,29 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/utilities.rst:7
|
||||
msgid "Utilities"
|
||||
msgstr "Utilitaires"
|
||||
|
||||
#: ../Doc/c-api/utilities.rst:9
|
||||
msgid ""
|
||||
"The functions in this chapter perform various utility tasks, ranging from "
|
||||
"helping C code be more portable across platforms, using Python modules from "
|
||||
"C, and parsing function arguments and constructing Python values from C "
|
||||
"values."
|
||||
msgstr ""
|
|
@ -0,0 +1,421 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:8
|
||||
msgid "The Very High Level Layer"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:10
|
||||
msgid ""
|
||||
"The functions in this chapter will let you execute Python source code given "
|
||||
"in a file or a buffer, but they will not let you interact in a more detailed "
|
||||
"way with the interpreter."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:14
|
||||
msgid ""
|
||||
"Several of these functions accept a start symbol from the grammar as a "
|
||||
"parameter. The available start symbols are :const:`Py_eval_input`, :const:"
|
||||
"`Py_file_input`, and :const:`Py_single_input`. These are described "
|
||||
"following the functions which accept them as parameters."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:19
|
||||
msgid ""
|
||||
"Note also that several of these functions take :c:type:`FILE\\*` "
|
||||
"parameters. One particular issue which needs to be handled carefully is "
|
||||
"that the :c:type:`FILE` structure for different C libraries can be different "
|
||||
"and incompatible. Under Windows (at least), it is possible for dynamically "
|
||||
"linked extensions to actually use different libraries, so care should be "
|
||||
"taken that :c:type:`FILE\\*` parameters are only passed to these functions "
|
||||
"if it is certain that they were created by the same library that the Python "
|
||||
"runtime is using."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:30
|
||||
msgid ""
|
||||
"The main program for the standard interpreter. This is made available for "
|
||||
"programs which embed Python. The *argc* and *argv* parameters should be "
|
||||
"prepared exactly as those which are passed to a C program's :c:func:`main` "
|
||||
"function (converted to wchar_t according to the user's locale). It is "
|
||||
"important to note that the argument list may be modified (but the contents "
|
||||
"of the strings pointed to by the argument list are not). The return value "
|
||||
"will be ``0`` if the interpreter exits normally (i.e., without an "
|
||||
"exception), ``1`` if the interpreter exits due to an exception, or ``2`` if "
|
||||
"the parameter list does not represent a valid Python command line."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:40
|
||||
msgid ""
|
||||
"Note that if an otherwise unhandled :exc:`SystemExit` is raised, this "
|
||||
"function will not return ``1``, but exit the process, as long as "
|
||||
"``Py_InspectFlag`` is not set."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:47
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, "
|
||||
"leaving *closeit* set to ``0`` and *flags* set to *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:53
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, "
|
||||
"leaving the *closeit* argument set to ``0``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:59
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_AnyFileExFlags` below, "
|
||||
"leaving the *flags* argument set to *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:65
|
||||
msgid ""
|
||||
"If *fp* refers to a file associated with an interactive device (console or "
|
||||
"terminal input or Unix pseudo-terminal), return the value of :c:func:"
|
||||
"`PyRun_InteractiveLoop`, otherwise return the result of :c:func:"
|
||||
"`PyRun_SimpleFile`. *filename* is decoded from the filesystem encoding (:"
|
||||
"func:`sys.getfilesystemencoding`). If *filename* is *NULL*, this function "
|
||||
"uses ``\"???\"`` as the filename."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:75
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_SimpleStringFlags` below, "
|
||||
"leaving the *PyCompilerFlags\\** argument set to NULL."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:81
|
||||
msgid ""
|
||||
"Executes the Python source code from *command* in the :mod:`__main__` module "
|
||||
"according to the *flags* argument. If :mod:`__main__` does not already "
|
||||
"exist, it is created. Returns ``0`` on success or ``-1`` if an exception "
|
||||
"was raised. If there was an error, there is no way to get the exception "
|
||||
"information. For the meaning of *flags*, see below."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:87
|
||||
msgid ""
|
||||
"Note that if an otherwise unhandled :exc:`SystemExit` is raised, this "
|
||||
"function will not return ``-1``, but exit the process, as long as "
|
||||
"``Py_InspectFlag`` is not set."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:94
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, "
|
||||
"leaving *closeit* set to ``0`` and *flags* set to *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:100
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, "
|
||||
"leaving *flags* set to *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:106
|
||||
msgid ""
|
||||
"Similar to :c:func:`PyRun_SimpleStringFlags`, but the Python source code is "
|
||||
"read from *fp* instead of an in-memory string. *filename* should be the name "
|
||||
"of the file, it is decoded from the filesystem encoding (:func:`sys."
|
||||
"getfilesystemencoding`). If *closeit* is true, the file is closed before "
|
||||
"PyRun_SimpleFileExFlags returns."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:115
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_InteractiveOneFlags` below, "
|
||||
"leaving *flags* set to *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:121
|
||||
msgid ""
|
||||
"Read and execute a single statement from a file associated with an "
|
||||
"interactive device according to the *flags* argument. The user will be "
|
||||
"prompted using ``sys.ps1`` and ``sys.ps2``. *filename* is decoded from the "
|
||||
"filesystem encoding (:func:`sys.getfilesystemencoding`)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:126
|
||||
msgid ""
|
||||
"Returns ``0`` when the input was executed successfully, ``-1`` if there was "
|
||||
"an exception, or an error code from the :file:`errcode.h` include file "
|
||||
"distributed as part of Python if there was a parse error. (Note that :file:"
|
||||
"`errcode.h` is not included by :file:`Python.h`, so must be included "
|
||||
"specifically if needed.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:135
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_InteractiveLoopFlags` "
|
||||
"below, leaving *flags* set to *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:141
|
||||
msgid ""
|
||||
"Read and execute statements from a file associated with an interactive "
|
||||
"device until EOF is reached. The user will be prompted using ``sys.ps1`` "
|
||||
"and ``sys.ps2``. *filename* is decoded from the filesystem encoding (:func:"
|
||||
"`sys.getfilesystemencoding`). Returns ``0`` at EOF."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:149
|
||||
msgid ""
|
||||
"Can be set to point to a function with the prototype ``int func(void)``. "
|
||||
"The function will be called when Python's interpreter prompt is about to "
|
||||
"become idle and wait for user input from the terminal. The return value is "
|
||||
"ignored. Overriding this hook can be used to integrate the interpreter's "
|
||||
"prompt with other event loops, as done in the :file:`Modules/_tkinter.c` in "
|
||||
"the Python source code."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:160
|
||||
msgid ""
|
||||
"Can be set to point to a function with the prototype ``char *func(FILE "
|
||||
"*stdin, FILE *stdout, char *prompt)``, overriding the default function used "
|
||||
"to read a single line of input at the interpreter's prompt. The function is "
|
||||
"expected to output the string *prompt* if it's not *NULL*, and then read a "
|
||||
"line of input from the provided standard input file, returning the resulting "
|
||||
"string. For example, The :mod:`readline` module sets this hook to provide "
|
||||
"line-editing and tab-completion features."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:169
|
||||
msgid ""
|
||||
"The result must be a string allocated by :c:func:`PyMem_RawMalloc` or :c:"
|
||||
"func:`PyMem_RawRealloc`, or *NULL* if an error occurred."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:172
|
||||
msgid ""
|
||||
"The result must be allocated by :c:func:`PyMem_RawMalloc` or :c:func:"
|
||||
"`PyMem_RawRealloc`, instead of being allocated by :c:func:`PyMem_Malloc` or :"
|
||||
"c:func:`PyMem_Realloc`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:180
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:"
|
||||
"`PyParser_SimpleParseStringFlagsFilename` below, leaving *filename* set to "
|
||||
"*NULL* and *flags* set to ``0``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:187
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:"
|
||||
"`PyParser_SimpleParseStringFlagsFilename` below, leaving *filename* set to "
|
||||
"*NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:194
|
||||
msgid ""
|
||||
"Parse Python source code from *str* using the start token *start* according "
|
||||
"to the *flags* argument. The result can be used to create a code object "
|
||||
"which can be evaluated efficiently. This is useful if a code fragment must "
|
||||
"be evaluated many times. *filename* is decoded from the filesystem encoding "
|
||||
"(:func:`sys.getfilesystemencoding`)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:203
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyParser_SimpleParseFileFlags` "
|
||||
"below, leaving *flags* set to ``0``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:209
|
||||
msgid ""
|
||||
"Similar to :c:func:`PyParser_SimpleParseStringFlagsFilename`, but the Python "
|
||||
"source code is read from *fp* instead of an in-memory string."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:215
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_StringFlags` below, leaving "
|
||||
"*flags* set to *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:221
|
||||
msgid ""
|
||||
"Execute Python source code from *str* in the context specified by the "
|
||||
"objects *globals* and *locals* with the compiler flags specified by "
|
||||
"*flags*. *globals* must be a dictionary; *locals* can be any object that "
|
||||
"implements the mapping protocol. The parameter *start* specifies the start "
|
||||
"token that should be used to parse the source code."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:227
|
||||
msgid ""
|
||||
"Returns the result of executing the code as a Python object, or *NULL* if an "
|
||||
"exception was raised."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:233
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving "
|
||||
"*closeit* set to ``0`` and *flags* set to *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:239
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving "
|
||||
"*flags* set to *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:245
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving "
|
||||
"*closeit* set to ``0``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:251
|
||||
msgid ""
|
||||
"Similar to :c:func:`PyRun_StringFlags`, but the Python source code is read "
|
||||
"from *fp* instead of an in-memory string. *filename* should be the name of "
|
||||
"the file, it is decoded from the filesystem encoding (:func:`sys."
|
||||
"getfilesystemencoding`). If *closeit* is true, the file is closed before :c:"
|
||||
"func:`PyRun_FileExFlags` returns."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:260
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`Py_CompileStringFlags` below, "
|
||||
"leaving *flags* set to *NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:266
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`Py_CompileStringExFlags` below, "
|
||||
"with *optimize* set to ``-1``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:272
|
||||
msgid ""
|
||||
"Parse and compile the Python source code in *str*, returning the resulting "
|
||||
"code object. The start token is given by *start*; this can be used to "
|
||||
"constrain the code which can be compiled and should be :const:"
|
||||
"`Py_eval_input`, :const:`Py_file_input`, or :const:`Py_single_input`. The "
|
||||
"filename specified by *filename* is used to construct the code object and "
|
||||
"may appear in tracebacks or :exc:`SyntaxError` exception messages. This "
|
||||
"returns *NULL* if the code cannot be parsed or compiled."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:280
|
||||
msgid ""
|
||||
"The integer *optimize* specifies the optimization level of the compiler; a "
|
||||
"value of ``-1`` selects the optimization level of the interpreter as given "
|
||||
"by :option:`-O` options. Explicit levels are ``0`` (no optimization; "
|
||||
"``__debug__`` is true), ``1`` (asserts are removed, ``__debug__`` is false) "
|
||||
"or ``2`` (docstrings are removed too)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:291
|
||||
msgid ""
|
||||
"Like :c:func:`Py_CompileStringObject`, but *filename* is a byte string "
|
||||
"decoded from the filesystem encoding (:func:`os.fsdecode`)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:298
|
||||
msgid ""
|
||||
"This is a simplified interface to :c:func:`PyEval_EvalCodeEx`, with just the "
|
||||
"code object, and global and local variables. The other arguments are set to "
|
||||
"*NULL*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:305
|
||||
msgid ""
|
||||
"Evaluate a precompiled code object, given a particular environment for its "
|
||||
"evaluation. This environment consists of a dictionary of global variables, "
|
||||
"a mapping object of local variables, arrays of arguments, keywords and "
|
||||
"defaults, and a closure tuple of cells."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:313
|
||||
msgid ""
|
||||
"The C structure of the objects used to describe frame objects. The fields of "
|
||||
"this type are subject to change at any time."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:319
|
||||
msgid ""
|
||||
"Evaluate an execution frame. This is a simplified interface to :c:func:"
|
||||
"`PyEval_EvalFrameEx`, for backward compatibility."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:325
|
||||
msgid ""
|
||||
"This is the main, unvarnished function of Python interpretation. It is "
|
||||
"literally 2000 lines long. The code object associated with the execution "
|
||||
"frame *f* is executed, interpreting bytecode and executing calls as needed. "
|
||||
"The additional *throwflag* parameter can mostly be ignored - if true, then "
|
||||
"it causes an exception to immediately be thrown; this is used for the :meth:"
|
||||
"`~generator.throw` methods of generator objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:332
|
||||
msgid ""
|
||||
"This function now includes a debug assertion to help ensure that it does not "
|
||||
"silently discard an active exception."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:339
|
||||
msgid ""
|
||||
"This function changes the flags of the current evaluation frame, and returns "
|
||||
"true on success, false on failure."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:347
|
||||
msgid ""
|
||||
"The start symbol from the Python grammar for isolated expressions; for use "
|
||||
"with :c:func:`Py_CompileString`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:355
|
||||
msgid ""
|
||||
"The start symbol from the Python grammar for sequences of statements as read "
|
||||
"from a file or other source; for use with :c:func:`Py_CompileString`. This "
|
||||
"is the symbol to use when compiling arbitrarily long Python source code."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:364
|
||||
msgid ""
|
||||
"The start symbol from the Python grammar for a single statement; for use "
|
||||
"with :c:func:`Py_CompileString`. This is the symbol used for the interactive "
|
||||
"interpreter loop."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:371
|
||||
msgid ""
|
||||
"This is the structure used to hold compiler flags. In cases where code is "
|
||||
"only being compiled, it is passed as ``int flags``, and in cases where code "
|
||||
"is being executed, it is passed as ``PyCompilerFlags *flags``. In this "
|
||||
"case, ``from __future__ import`` can modify *flags*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:376
|
||||
msgid ""
|
||||
"Whenever ``PyCompilerFlags *flags`` is *NULL*, :attr:`cf_flags` is treated "
|
||||
"as equal to ``0``, and any modification due to ``from __future__ import`` is "
|
||||
"discarded. ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/veryhigh.rst:387
|
||||
msgid ""
|
||||
"This bit can be set in *flags* to cause division operator ``/`` to be "
|
||||
"interpreted as \"true division\" according to :pep:`238`."
|
||||
msgstr ""
|
|
@ -0,0 +1,84 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/c-api/weakref.rst:6
|
||||
msgid "Weak Reference Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/weakref.rst:8
|
||||
msgid ""
|
||||
"Python supports *weak references* as first-class objects. There are two "
|
||||
"specific object types which directly implement weak references. The first "
|
||||
"is a simple reference object, and the second acts as a proxy for the "
|
||||
"original object as much as it can."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/weakref.rst:16
|
||||
msgid "Return true if *ob* is either a reference or proxy object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/weakref.rst:21
|
||||
msgid "Return true if *ob* is a reference object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/weakref.rst:26
|
||||
msgid "Return true if *ob* is a proxy object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/weakref.rst:31
|
||||
msgid ""
|
||||
"Return a weak reference object for the object *ob*. This will always return "
|
||||
"a new reference, but is not guaranteed to create a new object; an existing "
|
||||
"reference object may be returned. The second parameter, *callback*, can be "
|
||||
"a callable object that receives notification when *ob* is garbage collected; "
|
||||
"it should accept a single parameter, which will be the weak reference object "
|
||||
"itself. *callback* may also be ``None`` or *NULL*. If *ob* is not a weakly-"
|
||||
"referencable object, or if *callback* is not callable, ``None``, or *NULL*, "
|
||||
"this will return *NULL* and raise :exc:`TypeError`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/weakref.rst:43
|
||||
msgid ""
|
||||
"Return a weak reference proxy object for the object *ob*. This will always "
|
||||
"return a new reference, but is not guaranteed to create a new object; an "
|
||||
"existing proxy object may be returned. The second parameter, *callback*, "
|
||||
"can be a callable object that receives notification when *ob* is garbage "
|
||||
"collected; it should accept a single parameter, which will be the weak "
|
||||
"reference object itself. *callback* may also be ``None`` or *NULL*. If *ob* "
|
||||
"is not a weakly-referencable object, or if *callback* is not callable, "
|
||||
"``None``, or *NULL*, this will return *NULL* and raise :exc:`TypeError`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/weakref.rst:55
|
||||
msgid ""
|
||||
"Return the referenced object from a weak reference, *ref*. If the referent "
|
||||
"is no longer live, returns :const:`Py_None`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/weakref.rst:60
|
||||
msgid ""
|
||||
"This function returns a **borrowed reference** to the referenced object. "
|
||||
"This means that you should always call :c:func:`Py_INCREF` on the object "
|
||||
"except if you know that it cannot be destroyed while you are still using it."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/c-api/weakref.rst:68
|
||||
msgid ""
|
||||
"Similar to :c:func:`PyWeakref_GetObject`, but implemented as a macro that "
|
||||
"does no error checking."
|
||||
msgstr ""
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-17 21:44+0200\n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-17 21:44+0200\n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-17 21:44+0200\n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
5829
distutils.po
5829
distutils.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,808 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:5
|
||||
msgid "Creating Built Distributions"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:7
|
||||
msgid ""
|
||||
"A \"built distribution\" is what you're probably used to thinking of either "
|
||||
"as a \"binary package\" or an \"installer\" (depending on your background). "
|
||||
"It's not necessarily binary, though, because it might contain only Python "
|
||||
"source code and/or byte-code; and we don't call it a package, because that "
|
||||
"word is already spoken for in Python. (And \"installer\" is a term specific "
|
||||
"to the world of mainstream desktop systems.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:14
|
||||
msgid ""
|
||||
"A built distribution is how you make life as easy as possible for installers "
|
||||
"of your module distribution: for users of RPM-based Linux systems, it's a "
|
||||
"binary RPM; for Windows users, it's an executable installer; for Debian-"
|
||||
"based Linux users, it's a Debian package; and so forth. Obviously, no one "
|
||||
"person will be able to create built distributions for every platform under "
|
||||
"the sun, so the Distutils are designed to enable module developers to "
|
||||
"concentrate on their specialty---writing code and creating source "
|
||||
"distributions---while an intermediary species called *packagers* springs up "
|
||||
"to turn source distributions into built distributions for as many platforms "
|
||||
"as there are packagers."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:24
|
||||
msgid ""
|
||||
"Of course, the module developer could be his own packager; or the packager "
|
||||
"could be a volunteer \"out there\" somewhere who has access to a platform "
|
||||
"which the original developer does not; or it could be software periodically "
|
||||
"grabbing new source distributions and turning them into built distributions "
|
||||
"for as many platforms as the software has access to. Regardless of who they "
|
||||
"are, a packager uses the setup script and the :command:`bdist` command "
|
||||
"family to generate built distributions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:32
|
||||
msgid ""
|
||||
"As a simple example, if I run the following command in the Distutils source "
|
||||
"tree::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:37
|
||||
msgid ""
|
||||
"then the Distutils builds my module distribution (the Distutils itself in "
|
||||
"this case), does a \"fake\" installation (also in the :file:`build` "
|
||||
"directory), and creates the default type of built distribution for my "
|
||||
"platform. The default format for built distributions is a \"dumb\" tar file "
|
||||
"on Unix, and a simple executable installer on Windows. (That tar file is "
|
||||
"considered \"dumb\" because it has to be unpacked in a specific location to "
|
||||
"work.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:44
|
||||
msgid ""
|
||||
"Thus, the above command on a Unix system creates :file:`Distutils-1.0.{plat}."
|
||||
"tar.gz`; unpacking this tarball from the right place installs the Distutils "
|
||||
"just as though you had downloaded the source distribution and run ``python "
|
||||
"setup.py install``. (The \"right place\" is either the root of the "
|
||||
"filesystem or Python's :file:`{prefix}` directory, depending on the options "
|
||||
"given to the :command:`bdist_dumb` command; the default is to make dumb "
|
||||
"distributions relative to :file:`{prefix}`.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:52
|
||||
msgid ""
|
||||
"Obviously, for pure Python distributions, this isn't any simpler than just "
|
||||
"running ``python setup.py install``\\ ---but for non-pure distributions, "
|
||||
"which include extensions that would need to be compiled, it can mean the "
|
||||
"difference between someone being able to use your extensions or not. And "
|
||||
"creating \"smart\" built distributions, such as an RPM package or an "
|
||||
"executable installer for Windows, is far more convenient for users even if "
|
||||
"your distribution doesn't include any extensions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:60
|
||||
msgid ""
|
||||
"The :command:`bdist` command has a :option:`--formats` option, similar to "
|
||||
"the :command:`sdist` command, which you can use to select the types of built "
|
||||
"distribution to generate: for example, ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:66
|
||||
msgid ""
|
||||
"would, when run on a Unix system, create :file:`Distutils-1.0.{plat}.zip`\\ "
|
||||
"---again, this archive would be unpacked from the root directory to install "
|
||||
"the Distutils."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:70
|
||||
msgid "The available formats for built distributions are:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:73
|
||||
msgid "Format"
|
||||
msgstr "Format"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:73
|
||||
msgid "Description"
|
||||
msgstr "Description"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:73
|
||||
msgid "Notes"
|
||||
msgstr "Notes"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:75
|
||||
msgid "``gztar``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:75
|
||||
msgid "gzipped tar file (:file:`.tar.gz`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:75
|
||||
msgid "\\(1)"
|
||||
msgstr "\\(1)"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:78
|
||||
msgid "``bztar``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:78
|
||||
msgid "bzipped tar file (:file:`.tar.bz2`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:81
|
||||
msgid "``xztar``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:81
|
||||
msgid "xzipped tar file (:file:`.tar.xz`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:84
|
||||
msgid "``ztar``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:84
|
||||
msgid "compressed tar file (:file:`.tar.Z`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:84
|
||||
msgid "\\(3)"
|
||||
msgstr "\\(3)"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:87
|
||||
msgid "``tar``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:87
|
||||
msgid "tar file (:file:`.tar`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:89
|
||||
msgid "``zip``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:89
|
||||
msgid "zip file (:file:`.zip`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:89
|
||||
msgid "(2),(4)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:91
|
||||
msgid "``rpm``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:91
|
||||
msgid "RPM"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:91
|
||||
msgid "\\(5)"
|
||||
msgstr "\\(5)"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:93
|
||||
msgid "``pkgtool``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:93
|
||||
msgid "Solaris :program:`pkgtool`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:95
|
||||
msgid "``sdux``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:95
|
||||
msgid "HP-UX :program:`swinstall`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:97
|
||||
msgid "``wininst``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:97
|
||||
msgid "self-extracting ZIP file for Windows"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:97
|
||||
msgid "\\(4)"
|
||||
msgstr "\\(4)"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:100
|
||||
msgid "``msi``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:100
|
||||
msgid "Microsoft Installer."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:103
|
||||
msgid "Added support for the ``xztar`` format."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:107
|
||||
msgid "Notes:"
|
||||
msgstr "Notes : "
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:110
|
||||
msgid "default on Unix"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:113
|
||||
msgid "default on Windows"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:116
|
||||
msgid "requires external :program:`compress` utility."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:119
|
||||
msgid ""
|
||||
"requires either external :program:`zip` utility or :mod:`zipfile` module "
|
||||
"(part of the standard Python library since Python 1.6)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:123
|
||||
msgid ""
|
||||
"requires external :program:`rpm` utility, version 3.0.4 or better (use ``rpm "
|
||||
"--version`` to find out which version you have)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:126
|
||||
msgid ""
|
||||
"You don't have to use the :command:`bdist` command with the :option:`--"
|
||||
"formats` option; you can also use the command that directly implements the "
|
||||
"format you're interested in. Some of these :command:`bdist` \"sub-commands"
|
||||
"\" actually generate several similar formats; for instance, the :command:"
|
||||
"`bdist_dumb` command generates all the \"dumb\" archive formats (``tar``, "
|
||||
"``gztar``, ``bztar``, ``xztar``, ``ztar``, and ``zip``), and :command:"
|
||||
"`bdist_rpm` generates both binary and source RPMs. The :command:`bdist` sub-"
|
||||
"commands, and the formats generated by each, are:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:136
|
||||
msgid "Command"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:136
|
||||
msgid "Formats"
|
||||
msgstr "Formats"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:138
|
||||
msgid ":command:`bdist_dumb`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:138
|
||||
msgid "tar, gztar, bztar, xztar, ztar, zip"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:140
|
||||
msgid ":command:`bdist_rpm`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:140
|
||||
msgid "rpm, srpm"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:142
|
||||
msgid ":command:`bdist_wininst`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:142
|
||||
msgid "wininst"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:144
|
||||
msgid ":command:`bdist_msi`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:144
|
||||
msgid "msi"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:147
|
||||
msgid ""
|
||||
"The following sections give details on the individual :command:`bdist_\\*` "
|
||||
"commands."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:163
|
||||
msgid "Creating RPM packages"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:165
|
||||
msgid ""
|
||||
"The RPM format is used by many popular Linux distributions, including Red "
|
||||
"Hat, SuSE, and Mandrake. If one of these (or any of the other RPM-based "
|
||||
"Linux distributions) is your usual environment, creating RPM packages for "
|
||||
"other users of that same distribution is trivial. Depending on the "
|
||||
"complexity of your module distribution and differences between Linux "
|
||||
"distributions, you may also be able to create RPMs that work on different "
|
||||
"RPM-based distributions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:172
|
||||
msgid ""
|
||||
"The usual way to create an RPM of your module distribution is to run the :"
|
||||
"command:`bdist_rpm` command::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:177
|
||||
msgid "or the :command:`bdist` command with the :option:`--format` option::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:181
|
||||
msgid ""
|
||||
"The former allows you to specify RPM-specific options; the latter allows "
|
||||
"you to easily specify multiple formats in one run. If you need to do both, "
|
||||
"you can explicitly specify multiple :command:`bdist_\\*` commands and their "
|
||||
"options::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:188
|
||||
msgid ""
|
||||
"Creating RPM packages is driven by a :file:`.spec` file, much as using the "
|
||||
"Distutils is driven by the setup script. To make your life easier, the :"
|
||||
"command:`bdist_rpm` command normally creates a :file:`.spec` file based on "
|
||||
"the information you supply in the setup script, on the command line, and in "
|
||||
"any Distutils configuration files. Various options and sections in the :"
|
||||
"file:`.spec` file are derived from options in the setup script as follows:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:196 ../Doc/distutils/builtdist.rst:220
|
||||
msgid "RPM :file:`.spec` file option or section"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:196
|
||||
msgid "Distutils setup script option"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:198
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:198
|
||||
msgid "``name``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:200
|
||||
msgid "Summary (in preamble)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:200
|
||||
msgid "``description``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:202
|
||||
msgid "Version"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:202
|
||||
msgid "``version``"
|
||||
msgstr "``version``"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:204 ../Doc/distutils/builtdist.rst:227
|
||||
msgid "Vendor"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:204
|
||||
msgid ""
|
||||
"``author`` and ``author_email``, or --- & ``maintainer`` and "
|
||||
"``maintainer_email``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:208
|
||||
msgid "Copyright"
|
||||
msgstr "Copyright"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:208
|
||||
msgid "``license``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:210
|
||||
msgid "Url"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:210
|
||||
msgid "``url``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:212
|
||||
msgid "%description (section)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:212
|
||||
msgid "``long_description``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:215
|
||||
msgid ""
|
||||
"Additionally, there are many options in :file:`.spec` files that don't have "
|
||||
"corresponding options in the setup script. Most of these are handled "
|
||||
"through options to the :command:`bdist_rpm` command as follows:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:220
|
||||
msgid ":command:`bdist_rpm` option"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:220
|
||||
msgid "default value"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:223
|
||||
msgid "Release"
|
||||
msgstr "Version"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:223
|
||||
msgid "``release``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:223
|
||||
msgid "\"1\""
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:225
|
||||
msgid "Group"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:225
|
||||
msgid "``group``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:225
|
||||
msgid "\"Development/Libraries\""
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:227
|
||||
msgid "``vendor``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:227
|
||||
msgid "(see above)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:229
|
||||
msgid "Packager"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:229
|
||||
msgid "``packager``"
|
||||
msgstr "``packager``"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:229 ../Doc/distutils/builtdist.rst:231
|
||||
#: ../Doc/distutils/builtdist.rst:233 ../Doc/distutils/builtdist.rst:235
|
||||
#: ../Doc/distutils/builtdist.rst:237 ../Doc/distutils/builtdist.rst:239
|
||||
#: ../Doc/distutils/builtdist.rst:241 ../Doc/distutils/builtdist.rst:243
|
||||
msgid "(none)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:231
|
||||
msgid "Provides"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:231
|
||||
msgid "``provides``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:233
|
||||
msgid "Requires"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:233
|
||||
msgid "``requires``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:235
|
||||
msgid "Conflicts"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:235
|
||||
msgid "``conflicts``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:237
|
||||
msgid "Obsoletes"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:237
|
||||
msgid "``obsoletes``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:239
|
||||
msgid "Distribution"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:239
|
||||
msgid "``distribution_name``"
|
||||
msgstr "``distribution_name``"
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:241
|
||||
msgid "BuildRequires"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:241
|
||||
msgid "``build_requires``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:243
|
||||
msgid "Icon"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:243
|
||||
msgid "``icon``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:246
|
||||
msgid ""
|
||||
"Obviously, supplying even a few of these options on the command-line would "
|
||||
"be tedious and error-prone, so it's usually best to put them in the setup "
|
||||
"configuration file, :file:`setup.cfg`\\ ---see section :ref:`setup-config`. "
|
||||
"If you distribute or package many Python module distributions, you might "
|
||||
"want to put options that apply to all of them in your personal Distutils "
|
||||
"configuration file (:file:`~/.pydistutils.cfg`). If you want to temporarily "
|
||||
"disable this file, you can pass the :option:`--no-user-cfg` option to :file:"
|
||||
"`setup.py`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:254
|
||||
msgid ""
|
||||
"There are three steps to building a binary RPM package, all of which are "
|
||||
"handled automatically by the Distutils:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:257
|
||||
msgid ""
|
||||
"create a :file:`.spec` file, which describes the package (analogous to the "
|
||||
"Distutils setup script; in fact, much of the information in the setup "
|
||||
"script winds up in the :file:`.spec` file)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:261
|
||||
msgid "create the source RPM"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:263
|
||||
msgid ""
|
||||
"create the \"binary\" RPM (which may or may not contain binary code, "
|
||||
"depending on whether your module distribution contains Python extensions)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:266
|
||||
msgid ""
|
||||
"Normally, RPM bundles the last two steps together; when you use the "
|
||||
"Distutils, all three steps are typically bundled together."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:269
|
||||
msgid ""
|
||||
"If you wish, you can separate these three steps. You can use the :option:`--"
|
||||
"spec-only` option to make :command:`bdist_rpm` just create the :file:`.spec` "
|
||||
"file and exit; in this case, the :file:`.spec` file will be written to the "
|
||||
"\"distribution directory\"---normally :file:`dist/`, but customizable with "
|
||||
"the :option:`--dist-dir` option. (Normally, the :file:`.spec` file winds up "
|
||||
"deep in the \"build tree,\" in a temporary directory created by :command:"
|
||||
"`bdist_rpm`.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:297
|
||||
msgid "Creating Windows Installers"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:299
|
||||
msgid ""
|
||||
"Executable installers are the natural format for binary distributions on "
|
||||
"Windows. They display a nice graphical user interface, display some "
|
||||
"information about the module distribution to be installed taken from the "
|
||||
"metadata in the setup script, let the user select a few options, and start "
|
||||
"or cancel the installation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:305
|
||||
msgid ""
|
||||
"Since the metadata is taken from the setup script, creating Windows "
|
||||
"installers is usually as easy as running::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:310
|
||||
msgid "or the :command:`bdist` command with the :option:`--formats` option::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:314
|
||||
msgid ""
|
||||
"If you have a pure module distribution (only containing pure Python modules "
|
||||
"and packages), the resulting installer will be version independent and have "
|
||||
"a name like :file:`foo-1.0.win32.exe`. These installers can even be created "
|
||||
"on Unix platforms or Mac OS X."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:319
|
||||
msgid ""
|
||||
"If you have a non-pure distribution, the extensions can only be created on a "
|
||||
"Windows platform, and will be Python version dependent. The installer "
|
||||
"filename will reflect this and now has the form :file:`foo-1.0.win32-py2.0."
|
||||
"exe`. You have to create a separate installer for every Python version you "
|
||||
"want to support."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:325
|
||||
msgid ""
|
||||
"The installer will try to compile pure modules into :term:`bytecode` after "
|
||||
"installation on the target system in normal and optimizing mode. If you "
|
||||
"don't want this to happen for some reason, you can run the :command:"
|
||||
"`bdist_wininst` command with the :option:`--no-target-compile` and/or the :"
|
||||
"option:`--no-target-optimize` option."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:331
|
||||
msgid ""
|
||||
"By default the installer will display the cool \"Python Powered\" logo when "
|
||||
"it is run, but you can also supply your own 152x261 bitmap which must be a "
|
||||
"Windows :file:`.bmp` file with the :option:`--bitmap` option."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:335
|
||||
msgid ""
|
||||
"The installer will also display a large title on the desktop background "
|
||||
"window when it is run, which is constructed from the name of your "
|
||||
"distribution and the version number. This can be changed to another text by "
|
||||
"using the :option:`--title` option."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:340
|
||||
msgid ""
|
||||
"The installer file will be written to the \"distribution directory\" --- "
|
||||
"normally :file:`dist/`, but customizable with the :option:`--dist-dir` "
|
||||
"option."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:346
|
||||
msgid "Cross-compiling on Windows"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:348
|
||||
msgid ""
|
||||
"Starting with Python 2.6, distutils is capable of cross-compiling between "
|
||||
"Windows platforms. In practice, this means that with the correct tools "
|
||||
"installed, you can use a 32bit version of Windows to create 64bit extensions "
|
||||
"and vice-versa."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:353
|
||||
msgid ""
|
||||
"To build for an alternate platform, specify the :option:`--plat-name` option "
|
||||
"to the build command. Valid values are currently 'win32', 'win-amd64' and "
|
||||
"'win-ia64'. For example, on a 32bit version of Windows, you could execute::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:359
|
||||
msgid ""
|
||||
"to build a 64bit version of your extension. The Windows Installers also "
|
||||
"support this option, so the command::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:364
|
||||
msgid ""
|
||||
"would create a 64bit installation executable on your 32bit version of "
|
||||
"Windows."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:366
|
||||
msgid ""
|
||||
"To cross-compile, you must download the Python source code and cross-compile "
|
||||
"Python itself for the platform you are targeting - it is not possible from a "
|
||||
"binary installation of Python (as the .lib etc file for other platforms are "
|
||||
"not included.) In practice, this means the user of a 32 bit operating "
|
||||
"system will need to use Visual Studio 2008 to open the :file:`PCBuild/"
|
||||
"PCbuild.sln` solution in the Python source tree and build the \"x64\" "
|
||||
"configuration of the 'pythoncore' project before cross-compiling extensions "
|
||||
"is possible."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:375
|
||||
msgid ""
|
||||
"Note that by default, Visual Studio 2008 does not install 64bit compilers or "
|
||||
"tools. You may need to reexecute the Visual Studio setup process and select "
|
||||
"these tools (using Control Panel->[Add/Remove] Programs is a convenient way "
|
||||
"to check or modify your existing install.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:383
|
||||
msgid "The Postinstallation script"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:385
|
||||
msgid ""
|
||||
"Starting with Python 2.3, a postinstallation script can be specified with "
|
||||
"the :option:`--install-script` option. The basename of the script must be "
|
||||
"specified, and the script filename must also be listed in the scripts "
|
||||
"argument to the setup function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:390
|
||||
msgid ""
|
||||
"This script will be run at installation time on the target system after all "
|
||||
"the files have been copied, with ``argv[1]`` set to :option:`-install`, and "
|
||||
"again at uninstallation time before the files are removed with ``argv[1]`` "
|
||||
"set to :option:`-remove`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:395
|
||||
msgid ""
|
||||
"The installation script runs embedded in the windows installer, every output "
|
||||
"(``sys.stdout``, ``sys.stderr``) is redirected into a buffer and will be "
|
||||
"displayed in the GUI after the script has finished."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:399
|
||||
msgid ""
|
||||
"Some functions especially useful in this context are available as additional "
|
||||
"built-in functions in the installation script."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:406
|
||||
msgid ""
|
||||
"These functions should be called when a directory or file is created by the "
|
||||
"postinstall script at installation time. It will register *path* with the "
|
||||
"uninstaller, so that it will be removed when the distribution is "
|
||||
"uninstalled. To be safe, directories are only removed if they are empty."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:414
|
||||
msgid ""
|
||||
"This function can be used to retrieve special folder locations on Windows "
|
||||
"like the Start Menu or the Desktop. It returns the full path to the folder. "
|
||||
"*csidl_string* must be one of the following strings::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:434
|
||||
msgid "If the folder cannot be retrieved, :exc:`OSError` is raised."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:436
|
||||
msgid ""
|
||||
"Which folders are available depends on the exact Windows version, and "
|
||||
"probably also the configuration. For details refer to Microsoft's "
|
||||
"documentation of the :c:func:`SHGetSpecialFolderPath` function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:443
|
||||
msgid ""
|
||||
"This function creates a shortcut. *target* is the path to the program to be "
|
||||
"started by the shortcut. *description* is the description of the shortcut. "
|
||||
"*filename* is the title of the shortcut that the user will see. *arguments* "
|
||||
"specifies the command line arguments, if any. *workdir* is the working "
|
||||
"directory for the program. *iconpath* is the file containing the icon for "
|
||||
"the shortcut, and *iconindex* is the index of the icon in the file "
|
||||
"*iconpath*. Again, for details consult the Microsoft documentation for the :"
|
||||
"class:`IShellLink` interface."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:454
|
||||
msgid "Vista User Access Control (UAC)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/builtdist.rst:456
|
||||
msgid ""
|
||||
"Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-"
|
||||
"control` option. The default is 'none' (meaning no UAC handling is done), "
|
||||
"and other valid values are 'auto' (meaning prompt for UAC elevation if "
|
||||
"Python was installed for all users) and 'force' (meaning always prompt for "
|
||||
"elevation)."
|
||||
msgstr ""
|
|
@ -0,0 +1,142 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:5
|
||||
msgid "Command Reference"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:22
|
||||
msgid "Installing modules: the :command:`install` command family"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:24
|
||||
msgid ""
|
||||
"The install command ensures that the build commands have been run and then "
|
||||
"runs the subcommands :command:`install_lib`, :command:`install_data` and :"
|
||||
"command:`install_scripts`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:35
|
||||
msgid ":command:`install_data`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:37
|
||||
msgid "This command installs all data files provided with the distribution."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:43
|
||||
msgid ":command:`install_scripts`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:45
|
||||
msgid "This command installs all (Python) scripts in the distribution."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:54
|
||||
msgid "Creating a source distribution: the :command:`sdist` command"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:58
|
||||
msgid "The manifest template commands are:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:61
|
||||
msgid "Command"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:61
|
||||
msgid "Description"
|
||||
msgstr "Description"
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:63
|
||||
msgid ":command:`include pat1 pat2 ...`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:63
|
||||
msgid "include all files matching any of the listed patterns"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:66
|
||||
msgid ":command:`exclude pat1 pat2 ...`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:66
|
||||
msgid "exclude all files matching any of the listed patterns"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:69
|
||||
msgid ":command:`recursive-include dir pat1 pat2 ...`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:69
|
||||
msgid "include all files under *dir* matching any of the listed patterns"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:72
|
||||
msgid ":command:`recursive-exclude dir pat1 pat2 ...`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:72
|
||||
msgid "exclude all files under *dir* matching any of the listed patterns"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:75
|
||||
msgid ":command:`global-include pat1 pat2 ...`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:75
|
||||
msgid ""
|
||||
"include all files anywhere in the source tree matching --- & any of the "
|
||||
"listed patterns"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:78
|
||||
msgid ":command:`global-exclude pat1 pat2 ...`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:78
|
||||
msgid ""
|
||||
"exclude all files anywhere in the source tree matching --- & any of the "
|
||||
"listed patterns"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:81
|
||||
msgid ":command:`prune dir`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:81
|
||||
msgid "exclude all files under *dir*"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:83
|
||||
msgid ":command:`graft dir`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:83
|
||||
msgid "include all files under *dir*"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/commandref.rst:86
|
||||
msgid ""
|
||||
"The patterns here are Unix-style \"glob\" patterns: ``*`` matches any "
|
||||
"sequence of regular filename characters, ``?`` matches any single regular "
|
||||
"filename character, and ``[range]`` matches any of the characters in *range* "
|
||||
"(e.g., ``a-z``, ``a-zA-Z``, ``a-f0-9_.``). The definition of \"regular "
|
||||
"filename character\" is platform-specific: on Unix it is anything except "
|
||||
"slash; on Windows anything except backslash or colon."
|
||||
msgstr ""
|
|
@ -0,0 +1,159 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:5
|
||||
msgid "Writing the Setup Configuration File"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:7
|
||||
msgid ""
|
||||
"Often, it's not possible to write down everything needed to build a "
|
||||
"distribution *a priori*: you may need to get some information from the user, "
|
||||
"or from the user's system, in order to proceed. As long as that information "
|
||||
"is fairly simple---a list of directories to search for C header files or "
|
||||
"libraries, for example---then providing a configuration file, :file:`setup."
|
||||
"cfg`, for users to edit is a cheap and easy way to solicit it. "
|
||||
"Configuration files also let you provide default values for any command "
|
||||
"option, which the installer can then override either on the command-line or "
|
||||
"by editing the config file."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:16
|
||||
msgid ""
|
||||
"The setup configuration file is a useful middle-ground between the setup "
|
||||
"script ---which, ideally, would be opaque to installers [#]_---and the "
|
||||
"command-line to the setup script, which is outside of your control and "
|
||||
"entirely up to the installer. In fact, :file:`setup.cfg` (and any other "
|
||||
"Distutils configuration files present on the target system) are processed "
|
||||
"after the contents of the setup script, but before the command-line. This "
|
||||
"has several useful consequences:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:30
|
||||
msgid ""
|
||||
"installers can override some of what you put in :file:`setup.py` by editing :"
|
||||
"file:`setup.cfg`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:33
|
||||
msgid ""
|
||||
"you can provide non-standard defaults for options that are not easily set "
|
||||
"in :file:`setup.py`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:36
|
||||
msgid ""
|
||||
"installers can override anything in :file:`setup.cfg` using the command-line "
|
||||
"options to :file:`setup.py`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:39
|
||||
msgid "The basic syntax of the configuration file is simple::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:45
|
||||
msgid ""
|
||||
"where *command* is one of the Distutils commands (e.g. :command:`build_py`, :"
|
||||
"command:`install`), and *option* is one of the options that command "
|
||||
"supports. Any number of options can be supplied for each command, and any "
|
||||
"number of command sections can be included in the file. Blank lines are "
|
||||
"ignored, as are comments, which run from a ``'#'`` character until the end "
|
||||
"of the line. Long option values can be split across multiple lines simply "
|
||||
"by indenting the continuation lines."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:53
|
||||
msgid ""
|
||||
"You can find out the list of options supported by a particular command with "
|
||||
"the universal :option:`!--help` option, e.g. ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:69
|
||||
msgid ""
|
||||
"Note that an option spelled :option:`--foo-bar` on the command-line is "
|
||||
"spelled ``foo_bar`` in configuration files."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:74
|
||||
msgid ""
|
||||
"For example, say you want your extensions to be built \"in-place\"---that "
|
||||
"is, you have an extension :mod:`pkg.ext`, and you want the compiled "
|
||||
"extension file (:file:`ext.so` on Unix, say) to be put in the same source "
|
||||
"directory as your pure Python modules :mod:`pkg.mod1` and :mod:`pkg.mod2`. "
|
||||
"You can always use the :option:`--inplace` option on the command-line to "
|
||||
"ensure this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:82
|
||||
msgid ""
|
||||
"But this requires that you always specify the :command:`build_ext` command "
|
||||
"explicitly, and remember to provide :option:`--inplace`. An easier way is to "
|
||||
"\"set and forget\" this option, by encoding it in :file:`setup.cfg`, the "
|
||||
"configuration file for this distribution::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:90
|
||||
msgid ""
|
||||
"This will affect all builds of this module distribution, whether or not you "
|
||||
"explicitly specify :command:`build_ext`. If you include :file:`setup.cfg` "
|
||||
"in your source distribution, it will also affect end-user builds---which is "
|
||||
"probably a bad idea for this option, since always building extensions in-"
|
||||
"place would break installation of the module distribution. In certain "
|
||||
"peculiar cases, though, modules are built right in their installation "
|
||||
"directory, so this is conceivably a useful ability. (Distributing "
|
||||
"extensions that expect to be built in their installation directory is almost "
|
||||
"always a bad idea, though.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:99
|
||||
msgid ""
|
||||
"Another example: certain commands take a lot of options that don't change "
|
||||
"from run to run; for example, :command:`bdist_rpm` needs to know everything "
|
||||
"required to generate a \"spec\" file for creating an RPM distribution. Some "
|
||||
"of this information comes from the setup script, and some is automatically "
|
||||
"generated by the Distutils (such as the list of files installed). But some "
|
||||
"of it has to be supplied as options to :command:`bdist_rpm`, which would be "
|
||||
"very tedious to do on the command-line for every run. Hence, here is a "
|
||||
"snippet from the Distutils' own :file:`setup.cfg`::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:117
|
||||
msgid ""
|
||||
"Note that the ``doc_files`` option is simply a whitespace-separated string "
|
||||
"split across multiple lines for readability."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:124
|
||||
msgid ":ref:`inst-config-syntax` in \"Installing Python Modules\""
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:124
|
||||
msgid ""
|
||||
"More information on the configuration files is available in the manual for "
|
||||
"system administrators."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:129
|
||||
msgid "Footnotes"
|
||||
msgstr "Notes"
|
||||
|
||||
#: ../Doc/distutils/configfile.rst:130
|
||||
msgid ""
|
||||
"This ideal probably won't be achieved until auto-configuration is fully "
|
||||
"supported by the Distutils."
|
||||
msgstr ""
|
|
@ -0,0 +1,278 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/distutils/examples.rst:5
|
||||
msgid "Examples"
|
||||
msgstr "Exemples"
|
||||
|
||||
#: ../Doc/distutils/examples.rst:7
|
||||
msgid ""
|
||||
"This chapter provides a number of basic examples to help get started with "
|
||||
"distutils. Additional information about using distutils can be found in the "
|
||||
"Distutils Cookbook."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:14
|
||||
msgid "`Distutils Cookbook <https://wiki.python.org/moin/Distutils/Cookbook>`_"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:15
|
||||
msgid ""
|
||||
"Collection of recipes showing how to achieve more control over distutils."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:21
|
||||
msgid "Pure Python distribution (by module)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:23
|
||||
msgid ""
|
||||
"If you're just distributing a couple of modules, especially if they don't "
|
||||
"live in a particular package, you can specify them individually using the "
|
||||
"``py_modules`` option in the setup script."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:27
|
||||
msgid ""
|
||||
"In the simplest case, you'll have two files to worry about: a setup script "
|
||||
"and the single module you're distributing, :file:`foo.py` in this example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:34
|
||||
msgid ""
|
||||
"(In all diagrams in this section, *<root>* will refer to the distribution "
|
||||
"root directory.) A minimal setup script to describe this situation would "
|
||||
"be::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:43
|
||||
msgid ""
|
||||
"Note that the name of the distribution is specified independently with the "
|
||||
"``name`` option, and there's no rule that says it has to be the same as the "
|
||||
"name of the sole module in the distribution (although that's probably a good "
|
||||
"convention to follow). However, the distribution name is used to generate "
|
||||
"filenames, so you should stick to letters, digits, underscores, and hyphens."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:49
|
||||
msgid ""
|
||||
"Since ``py_modules`` is a list, you can of course specify multiple modules, "
|
||||
"eg. if you're distributing modules :mod:`foo` and :mod:`bar`, your setup "
|
||||
"might look like this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:58
|
||||
msgid "and the setup script might be ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:66
|
||||
msgid ""
|
||||
"You can put module source files into another directory, but if you have "
|
||||
"enough modules to do that, it's probably easier to specify modules by "
|
||||
"package rather than listing them individually."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:74
|
||||
msgid "Pure Python distribution (by package)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:76
|
||||
msgid ""
|
||||
"If you have more than a couple of modules to distribute, especially if they "
|
||||
"are in multiple packages, it's probably easier to specify whole packages "
|
||||
"rather than individual modules. This works even if your modules are not in "
|
||||
"a package; you can just tell the Distutils to process modules from the root "
|
||||
"package, and that works the same as any other package (except that you don't "
|
||||
"have to have an :file:`__init__.py` file)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:83
|
||||
msgid "The setup script from the last example could also be written as ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:91
|
||||
msgid "(The empty string stands for the root package.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:93
|
||||
msgid ""
|
||||
"If those two files are moved into a subdirectory, but remain in the root "
|
||||
"package, e.g.::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:101
|
||||
msgid ""
|
||||
"then you would still specify the root package, but you have to tell the "
|
||||
"Distutils where source files in the root package live::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:111
|
||||
msgid ""
|
||||
"More typically, though, you will want to distribute multiple modules in the "
|
||||
"same package (or in sub-packages). For example, if the :mod:`foo` and :mod:"
|
||||
"`bar` modules belong in package :mod:`foobar`, one way to layout your source "
|
||||
"tree is ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:123
|
||||
msgid ""
|
||||
"This is in fact the default layout expected by the Distutils, and the one "
|
||||
"that requires the least work to describe in your setup script::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:132
|
||||
msgid ""
|
||||
"If you want to put modules in directories not named for their package, then "
|
||||
"you need to use the ``package_dir`` option again. For example, if the :file:"
|
||||
"`src` directory holds modules in the :mod:`foobar` package::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:143
|
||||
msgid "an appropriate setup script would be ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:152
|
||||
msgid ""
|
||||
"Or, you might put modules from your main package right in the distribution "
|
||||
"root::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:161
|
||||
msgid "in which case your setup script would be ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:170
|
||||
msgid "(The empty string also stands for the current directory.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:172
|
||||
msgid ""
|
||||
"If you have sub-packages, they must be explicitly listed in ``packages``, "
|
||||
"but any entries in ``package_dir`` automatically extend to sub-packages. (In "
|
||||
"other words, the Distutils does *not* scan your source tree, trying to "
|
||||
"figure out which directories correspond to Python packages by looking for :"
|
||||
"file:`__init__.py` files.) Thus, if the default layout grows a sub-package::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:188
|
||||
msgid "then the corresponding setup script would be ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:200
|
||||
msgid "Single extension module"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:202
|
||||
msgid ""
|
||||
"Extension modules are specified using the ``ext_modules`` option. "
|
||||
"``package_dir`` has no effect on where extension source files are found; it "
|
||||
"only affects the source for pure Python modules. The simplest case, a "
|
||||
"single extension module in a single C source file, is::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:211
|
||||
msgid ""
|
||||
"If the :mod:`foo` extension belongs in the root package, the setup script "
|
||||
"for this could be ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:221
|
||||
msgid "If the extension actually belongs in a package, say :mod:`foopkg`, then"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:223
|
||||
msgid ""
|
||||
"With exactly the same source tree layout, this extension can be put in the :"
|
||||
"mod:`foopkg` package simply by changing the name of the extension::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:234
|
||||
msgid "Checking a package"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:236
|
||||
msgid ""
|
||||
"The ``check`` command allows you to verify if your package meta-data meet "
|
||||
"the minimum requirements to build a distribution."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:239
|
||||
msgid ""
|
||||
"To run it, just call it using your :file:`setup.py` script. If something is "
|
||||
"missing, ``check`` will display a warning."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:242
|
||||
msgid "Let's take an example with a simple script::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:248
|
||||
msgid "Running the ``check`` command will display some warnings:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:259
|
||||
msgid ""
|
||||
"If you use the reStructuredText syntax in the ``long_description`` field and "
|
||||
"`docutils`_ is installed you can check if the syntax is fine with the "
|
||||
"``check`` command, using the ``restructuredtext`` option."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:263
|
||||
msgid "For example, if the :file:`setup.py` script is changed like this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:278
|
||||
msgid ""
|
||||
"Where the long description is broken, ``check`` will be able to detect it by "
|
||||
"using the :mod:`docutils` parser:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:289
|
||||
msgid "Reading the metadata"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:291
|
||||
msgid ""
|
||||
"The :func:`distutils.core.setup` function provides a command-line interface "
|
||||
"that allows you to query the metadata fields of a project through the "
|
||||
"``setup.py`` script of a given project:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:300
|
||||
msgid ""
|
||||
"This call reads the ``name`` metadata by running the :func:`distutils.core."
|
||||
"setup` function. Although, when a source or binary distribution is created "
|
||||
"with Distutils, the metadata fields are written in a static file called :"
|
||||
"file:`PKG-INFO`. When a Distutils-based project is installed in Python, the :"
|
||||
"file:`PKG-INFO` file is copied alongside the modules and packages of the "
|
||||
"distribution under :file:`NAME-VERSION-pyX.X.egg-info`, where ``NAME`` is "
|
||||
"the name of the project, ``VERSION`` its version as defined in the Metadata, "
|
||||
"and ``pyX.X`` the major and minor version of Python like ``2.7`` or ``3.2``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:310
|
||||
msgid ""
|
||||
"You can read back this static file, by using the :class:`distutils.dist."
|
||||
"DistributionMetadata` class and its :func:`read_pkg_file` method::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/examples.rst:324
|
||||
msgid ""
|
||||
"Notice that the class can also be instanciated with a metadata file path to "
|
||||
"loads its values::"
|
||||
msgstr ""
|
|
@ -0,0 +1,120 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/distutils/extending.rst:5
|
||||
msgid "Extending Distutils"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/extending.rst:7
|
||||
msgid ""
|
||||
"Distutils can be extended in various ways. Most extensions take the form of "
|
||||
"new commands or replacements for existing commands. New commands may be "
|
||||
"written to support new types of platform-specific packaging, for example, "
|
||||
"while replacements for existing commands may be made to modify details of "
|
||||
"how the command operates on a package."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/extending.rst:13
|
||||
msgid ""
|
||||
"Most extensions of the distutils are made within :file:`setup.py` scripts "
|
||||
"that want to modify existing commands; many simply add a few file extensions "
|
||||
"that should be copied into packages in addition to :file:`.py` files as a "
|
||||
"convenience."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/extending.rst:18
|
||||
msgid ""
|
||||
"Most distutils command implementations are subclasses of the :class:"
|
||||
"`distutils.cmd.Command` class. New commands may directly inherit from :"
|
||||
"class:`Command`, while replacements often derive from :class:`Command` "
|
||||
"indirectly, directly subclassing the command they are replacing. Commands "
|
||||
"are required to derive from :class:`Command`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/extending.rst:33
|
||||
msgid "Integrating new commands"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/extending.rst:35
|
||||
msgid ""
|
||||
"There are different ways to integrate new command implementations into "
|
||||
"distutils. The most difficult is to lobby for the inclusion of the new "
|
||||
"features in distutils itself, and wait for (and require) a version of Python "
|
||||
"that provides that support. This is really hard for many reasons."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/extending.rst:40
|
||||
msgid ""
|
||||
"The most common, and possibly the most reasonable for most needs, is to "
|
||||
"include the new implementations with your :file:`setup.py` script, and cause "
|
||||
"the :func:`distutils.core.setup` function use them::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/extending.rst:55
|
||||
msgid ""
|
||||
"This approach is most valuable if the new implementations must be used to "
|
||||
"use a particular package, as everyone interested in the package will need to "
|
||||
"have the new command implementation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/extending.rst:59
|
||||
msgid ""
|
||||
"Beginning with Python 2.4, a third option is available, intended to allow "
|
||||
"new commands to be added which can support existing :file:`setup.py` scripts "
|
||||
"without requiring modifications to the Python installation. This is "
|
||||
"expected to allow third-party extensions to provide support for additional "
|
||||
"packaging systems, but the commands can be used for anything distutils "
|
||||
"commands can be used for. A new configuration option, ``command_packages`` "
|
||||
"(command-line option :option:`--command-packages`), can be used to specify "
|
||||
"additional packages to be searched for modules implementing commands. Like "
|
||||
"all distutils options, this can be specified on the command line or in a "
|
||||
"configuration file. This option can only be set in the ``[global]`` section "
|
||||
"of a configuration file, or before any commands on the command line. If set "
|
||||
"in a configuration file, it can be overridden from the command line; setting "
|
||||
"it to an empty string on the command line causes the default to be used. "
|
||||
"This should never be set in a configuration file provided with a package."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/extending.rst:74
|
||||
msgid ""
|
||||
"This new option can be used to add any number of packages to the list of "
|
||||
"packages searched for command implementations; multiple package names should "
|
||||
"be separated by commas. When not specified, the search is only performed in "
|
||||
"the :mod:`distutils.command` package. When :file:`setup.py` is run with the "
|
||||
"option ``--command-packages distcmds,buildcmds``, however, the packages :mod:"
|
||||
"`distutils.command`, :mod:`distcmds`, and :mod:`buildcmds` will be searched "
|
||||
"in that order. New commands are expected to be implemented in modules of "
|
||||
"the same name as the command by classes sharing the same name. Given the "
|
||||
"example command line option above, the command :command:`bdist_openpkg` "
|
||||
"could be implemented by the class :class:`distcmds.bdist_openpkg."
|
||||
"bdist_openpkg` or :class:`buildcmds.bdist_openpkg.bdist_openpkg`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/extending.rst:88
|
||||
msgid "Adding new distribution types"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/extending.rst:90
|
||||
msgid ""
|
||||
"Commands that create distributions (files in the :file:`dist/` directory) "
|
||||
"need to add ``(command, filename)`` pairs to ``self.distribution."
|
||||
"dist_files`` so that :command:`upload` can upload it to PyPI. The "
|
||||
"*filename* in the pair contains no path information, only the name of the "
|
||||
"file itself. In dry-run mode, pairs should still be added to represent what "
|
||||
"would have been created."
|
||||
msgstr ""
|
|
@ -0,0 +1,54 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/distutils/index.rst:5
|
||||
msgid "Distributing Python Modules (Legacy version)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/index.rst:7
|
||||
msgid "Greg Ward, Anthony Baxter"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/index.rst:8
|
||||
msgid "distutils-sig@python.org"
|
||||
msgstr "distutils-sig@python.org"
|
||||
|
||||
#: ../Doc/distutils/index.rst:12
|
||||
msgid ":ref:`distributing-index`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/index.rst:13
|
||||
msgid "The up to date module distribution documentations"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/index.rst:15
|
||||
msgid ""
|
||||
"This document describes the Python Distribution Utilities (\"Distutils\") "
|
||||
"from the module developer's point of view, describing how to use the "
|
||||
"Distutils to make Python modules and extensions easily available to a wider "
|
||||
"audience with very little overhead for build/release/install mechanics."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/index.rst:22
|
||||
msgid ""
|
||||
"This guide only covers the basic tools for building and distributing "
|
||||
"extensions that are provided as part of this version of Python. Third party "
|
||||
"tools offer easier to use and more secure alternatives. Refer to the `quick "
|
||||
"recommendations section <https://packaging.python.org/en/latest/current/>`__ "
|
||||
"in the Python Packaging User Guide for more information."
|
||||
msgstr ""
|
|
@ -0,0 +1,335 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:5
|
||||
msgid "An Introduction to Distutils"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:7
|
||||
msgid ""
|
||||
"This document covers using the Distutils to distribute your Python modules, "
|
||||
"concentrating on the role of developer/distributor: if you're looking for "
|
||||
"information on installing Python modules, you should refer to the :ref:"
|
||||
"`install-index` chapter."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:16
|
||||
msgid "Concepts & Terminology"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:18
|
||||
msgid ""
|
||||
"Using the Distutils is quite simple, both for module developers and for "
|
||||
"users/administrators installing third-party modules. As a developer, your "
|
||||
"responsibilities (apart from writing solid, well-documented and well-tested "
|
||||
"code, of course!) are:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:23
|
||||
msgid "write a setup script (:file:`setup.py` by convention)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:25
|
||||
msgid "(optional) write a setup configuration file"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:27
|
||||
msgid "create a source distribution"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:29
|
||||
msgid "(optional) create one or more built (binary) distributions"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:31
|
||||
msgid "Each of these tasks is covered in this document."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:33
|
||||
msgid ""
|
||||
"Not all module developers have access to a multitude of platforms, so it's "
|
||||
"not always feasible to expect them to create a multitude of built "
|
||||
"distributions. It is hoped that a class of intermediaries, called "
|
||||
"*packagers*, will arise to address this need. Packagers will take source "
|
||||
"distributions released by module developers, build them on one or more "
|
||||
"platforms, and release the resulting built distributions. Thus, users on "
|
||||
"the most popular platforms will be able to install most popular Python "
|
||||
"module distributions in the most natural way for their platform, without "
|
||||
"having to run a single setup script or compile a line of code."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:47
|
||||
msgid "A Simple Example"
|
||||
msgstr "Un exemple simple"
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:49
|
||||
msgid ""
|
||||
"The setup script is usually quite simple, although since it's written in "
|
||||
"Python, there are no arbitrary limits to what you can do with it, though you "
|
||||
"should be careful about putting arbitrarily expensive operations in your "
|
||||
"setup script. Unlike, say, Autoconf-style configure scripts, the setup "
|
||||
"script may be run multiple times in the course of building and installing "
|
||||
"your module distribution."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:56
|
||||
msgid ""
|
||||
"If all you want to do is distribute a module called :mod:`foo`, contained in "
|
||||
"a file :file:`foo.py`, then your setup script can be as simple as this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:65
|
||||
msgid "Some observations:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:67
|
||||
msgid ""
|
||||
"most information that you supply to the Distutils is supplied as keyword "
|
||||
"arguments to the :func:`setup` function"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:70
|
||||
msgid ""
|
||||
"those keyword arguments fall into two categories: package metadata (name, "
|
||||
"version number) and information about what's in the package (a list of pure "
|
||||
"Python modules, in this case)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:74
|
||||
msgid ""
|
||||
"modules are specified by module name, not filename (the same will hold true "
|
||||
"for packages and extensions)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:77
|
||||
msgid ""
|
||||
"it's recommended that you supply a little more metadata, in particular your "
|
||||
"name, email address and a URL for the project (see section :ref:`setup-"
|
||||
"script` for an example)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:81
|
||||
msgid ""
|
||||
"To create a source distribution for this module, you would create a setup "
|
||||
"script, :file:`setup.py`, containing the above code, and run this command "
|
||||
"from a terminal::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:87
|
||||
msgid ""
|
||||
"For Windows, open a command prompt window (:menuselection:`Start --> "
|
||||
"Accessories`) and change the command to::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:92
|
||||
msgid ""
|
||||
":command:`sdist` will create an archive file (e.g., tarball on Unix, ZIP "
|
||||
"file on Windows) containing your setup script :file:`setup.py`, and your "
|
||||
"module :file:`foo.py`. The archive file will be named :file:`foo-1.0.tar.gz` "
|
||||
"(or :file:`.zip`), and will unpack into a directory :file:`foo-1.0`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:97
|
||||
msgid ""
|
||||
"If an end-user wishes to install your :mod:`foo` module, all she has to do "
|
||||
"is download :file:`foo-1.0.tar.gz` (or :file:`.zip`), unpack it, and---from "
|
||||
"the :file:`foo-1.0` directory---run ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:103
|
||||
msgid ""
|
||||
"which will ultimately copy :file:`foo.py` to the appropriate directory for "
|
||||
"third-party modules in their Python installation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:106
|
||||
msgid ""
|
||||
"This simple example demonstrates some fundamental concepts of the Distutils. "
|
||||
"First, both developers and installers have the same basic user interface, i."
|
||||
"e. the setup script. The difference is which Distutils *commands* they use: "
|
||||
"the :command:`sdist` command is almost exclusively for module developers, "
|
||||
"while :command:`install` is more often for installers (although most "
|
||||
"developers will want to install their own code occasionally)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:113
|
||||
msgid ""
|
||||
"If you want to make things really easy for your users, you can create one or "
|
||||
"more built distributions for them. For instance, if you are running on a "
|
||||
"Windows machine, and want to make things easy for other Windows users, you "
|
||||
"can create an executable installer (the most appropriate type of built "
|
||||
"distribution for this platform) with the :command:`bdist_wininst` command. "
|
||||
"For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:121
|
||||
msgid ""
|
||||
"will create an executable installer, :file:`foo-1.0.win32.exe`, in the "
|
||||
"current directory."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:124
|
||||
msgid ""
|
||||
"Other useful built distribution formats are RPM, implemented by the :command:"
|
||||
"`bdist_rpm` command, Solaris :program:`pkgtool` (:command:`bdist_pkgtool`), "
|
||||
"and HP-UX :program:`swinstall` (:command:`bdist_sdux`). For example, the "
|
||||
"following command will create an RPM file called :file:`foo-1.0.noarch.rpm`::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:132
|
||||
msgid ""
|
||||
"(The :command:`bdist_rpm` command uses the :command:`rpm` executable, "
|
||||
"therefore this has to be run on an RPM-based system such as Red Hat Linux, "
|
||||
"SuSE Linux, or Mandrake Linux.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:136
|
||||
msgid ""
|
||||
"You can find out what distribution formats are available at any time by "
|
||||
"running ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:145
|
||||
msgid "General Python terminology"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:147
|
||||
msgid ""
|
||||
"If you're reading this document, you probably have a good idea of what "
|
||||
"modules, extensions, and so forth are. Nevertheless, just to be sure that "
|
||||
"everyone is operating from a common starting point, we offer the following "
|
||||
"glossary of common Python terms:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:155
|
||||
msgid "module"
|
||||
msgstr "module"
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:153
|
||||
msgid ""
|
||||
"the basic unit of code reusability in Python: a block of code imported by "
|
||||
"some other code. Three types of modules concern us here: pure Python "
|
||||
"modules, extension modules, and packages."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:160
|
||||
msgid "pure Python module"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:158
|
||||
msgid ""
|
||||
"a module written in Python and contained in a single :file:`.py` file (and "
|
||||
"possibly associated :file:`.pyc` files). Sometimes referred to as a \"pure "
|
||||
"module.\""
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:168
|
||||
msgid "extension module"
|
||||
msgstr "module d'extension"
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:163
|
||||
msgid ""
|
||||
"a module written in the low-level language of the Python implementation: C/C+"
|
||||
"+ for Python, Java for Jython. Typically contained in a single dynamically "
|
||||
"loadable pre-compiled file, e.g. a shared object (:file:`.so`) file for "
|
||||
"Python extensions on Unix, a DLL (given the :file:`.pyd` extension) for "
|
||||
"Python extensions on Windows, or a Java class file for Jython extensions. "
|
||||
"(Note that currently, the Distutils only handles C/C++ extensions for "
|
||||
"Python.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:173
|
||||
msgid "package"
|
||||
msgstr "paquet"
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:171
|
||||
msgid ""
|
||||
"a module that contains other modules; typically contained in a directory in "
|
||||
"the filesystem and distinguished from other directories by the presence of a "
|
||||
"file :file:`__init__.py`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:183
|
||||
msgid "root package"
|
||||
msgstr "paquet racine"
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:176
|
||||
msgid ""
|
||||
"the root of the hierarchy of packages. (This isn't really a package, since "
|
||||
"it doesn't have an :file:`__init__.py` file. But we have to call it "
|
||||
"something.) The vast majority of the standard library is in the root "
|
||||
"package, as are many small, standalone third-party modules that don't belong "
|
||||
"to a larger module collection. Unlike regular packages, modules in the root "
|
||||
"package can be found in many directories: in fact, every directory listed in "
|
||||
"``sys.path`` contributes modules to the root package."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:188
|
||||
msgid "Distutils-specific terminology"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:190
|
||||
msgid ""
|
||||
"The following terms apply more specifically to the domain of distributing "
|
||||
"Python modules using the Distutils:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:199
|
||||
msgid "module distribution"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:194
|
||||
msgid ""
|
||||
"a collection of Python modules distributed together as a single downloadable "
|
||||
"resource and meant to be installed *en masse*. Examples of some well-known "
|
||||
"module distributions are NumPy, SciPy, PIL (the Python Imaging Library), or "
|
||||
"mxBase. (This would be called a *package*, except that term is already "
|
||||
"taken in the Python context: a single module distribution may contain zero, "
|
||||
"one, or many Python packages.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:203
|
||||
msgid "pure module distribution"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:202
|
||||
msgid ""
|
||||
"a module distribution that contains only pure Python modules and packages. "
|
||||
"Sometimes referred to as a \"pure distribution.\""
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:207
|
||||
msgid "non-pure module distribution"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:206
|
||||
msgid ""
|
||||
"a module distribution that contains at least one extension module. "
|
||||
"Sometimes referred to as a \"non-pure distribution.\""
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:211
|
||||
msgid "distribution root"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/introduction.rst:210
|
||||
msgid ""
|
||||
"the top-level directory of your source tree (or source distribution); the "
|
||||
"directory where :file:`setup.py` exists. Generally :file:`setup.py` will "
|
||||
"be run from this directory."
|
||||
msgstr ""
|
|
@ -0,0 +1,312 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:9
|
||||
msgid "The Python Package Index (PyPI)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:11
|
||||
msgid ""
|
||||
"The `Python Package Index (PyPI)`_ stores :ref:`meta-data <meta-data>` "
|
||||
"describing distributions packaged with distutils, as well as package data "
|
||||
"like distribution files if a package author wishes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:15
|
||||
msgid ""
|
||||
"Distutils provides the :command:`register` and :command:`upload` commands "
|
||||
"for pushing meta-data and distribution files to PyPI, respectively. See :"
|
||||
"ref:`package-commands` for information on these commands."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:21
|
||||
msgid "PyPI overview"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:23
|
||||
msgid ""
|
||||
"PyPI lets you submit any number of versions of your distribution to the "
|
||||
"index. If you alter the meta-data for a particular version, you can submit "
|
||||
"it again and the index will be updated."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:27
|
||||
msgid ""
|
||||
"PyPI holds a record for each (name, version) combination submitted. The "
|
||||
"first user to submit information for a given name is designated the Owner of "
|
||||
"that name. Changes can be submitted through the :command:`register` command "
|
||||
"or through the web interface. Owners can designate other users as Owners or "
|
||||
"Maintainers. Maintainers can edit the package information, but not "
|
||||
"designate new Owners or Maintainers."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:34
|
||||
msgid ""
|
||||
"By default PyPI displays only the newest version of a given package. The "
|
||||
"web interface lets one change this default behavior and manually select "
|
||||
"which versions to display and hide."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:38
|
||||
msgid ""
|
||||
"For each version, PyPI displays a home page. The home page is created from "
|
||||
"the ``long_description`` which can be submitted via the :command:`register` "
|
||||
"command. See :ref:`package-display` for more information."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:46
|
||||
msgid "Distutils commands"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:48
|
||||
msgid ""
|
||||
"Distutils exposes two commands for submitting package data to PyPI: the :ref:"
|
||||
"`register <package-register>` command for submitting meta-data to PyPI and "
|
||||
"the :ref:`upload <package-upload>` command for submitting distribution "
|
||||
"files. Both commands read configuration data from a special file called a :"
|
||||
"ref:`.pypirc file <pypirc>`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:58
|
||||
msgid "The ``register`` command"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:60
|
||||
msgid ""
|
||||
"The distutils command :command:`register` is used to submit your "
|
||||
"distribution's meta-data to an index server. It is invoked as follows::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:65
|
||||
msgid "Distutils will respond with the following prompt::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:75
|
||||
msgid ""
|
||||
"Note: if your username and password are saved locally, you will not see this "
|
||||
"menu. Also, refer to :ref:`pypirc` for how to store your credentials in a :"
|
||||
"file:`.pypirc` file."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:79
|
||||
msgid ""
|
||||
"If you have not registered with PyPI, then you will need to do so now. You "
|
||||
"should choose option 2, and enter your details as required. Soon after "
|
||||
"submitting your details, you will receive an email which will be used to "
|
||||
"confirm your registration."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:84
|
||||
msgid ""
|
||||
"Once you are registered, you may choose option 1 from the menu. You will be "
|
||||
"prompted for your PyPI username and password, and :command:`register` will "
|
||||
"then submit your meta-data to the index."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:88
|
||||
msgid ""
|
||||
"See :ref:`package-cmdoptions` for options to the :command:`register` command."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:94
|
||||
msgid "The ``upload`` command"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:96
|
||||
msgid ""
|
||||
"The distutils command :command:`upload` pushes the distribution files to "
|
||||
"PyPI."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:98
|
||||
msgid ""
|
||||
"The command is invoked immediately after building one or more distribution "
|
||||
"files. For example, the command ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:103
|
||||
msgid ""
|
||||
"will cause the source distribution and the Windows installer to be uploaded "
|
||||
"to PyPI. Note that these will be uploaded even if they are built using an "
|
||||
"earlier invocation of :file:`setup.py`, but that only distributions named on "
|
||||
"the command line for the invocation including the :command:`upload` command "
|
||||
"are uploaded."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:108
|
||||
msgid ""
|
||||
"If a :command:`register` command was previously called in the same command, "
|
||||
"and if the password was entered in the prompt, :command:`upload` will reuse "
|
||||
"the entered password. This is useful if you do not want to store a password "
|
||||
"in clear text in a :file:`.pypirc` file."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:113
|
||||
msgid ""
|
||||
"You can use the ``--sign`` option to tell :command:`upload` to sign each "
|
||||
"uploaded file using GPG (GNU Privacy Guard). The :program:`gpg` program "
|
||||
"must be available for execution on the system :envvar:`PATH`. You can also "
|
||||
"specify which key to use for signing using the ``--identity=name`` option."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:118
|
||||
msgid ""
|
||||
"See :ref:`package-cmdoptions` for additional options to the :command:"
|
||||
"`upload` command."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:125
|
||||
msgid "Additional command options"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:127
|
||||
msgid ""
|
||||
"This section describes options common to both the :command:`register` and :"
|
||||
"command:`upload` commands."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:130
|
||||
msgid ""
|
||||
"The ``--repository`` or ``-r`` option lets you specify a PyPI server "
|
||||
"different from the default. For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:135
|
||||
msgid ""
|
||||
"For convenience, a name can be used in place of the URL when the :file:`."
|
||||
"pypirc` file is configured to do so. For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:140
|
||||
msgid "See :ref:`pypirc` for more information on defining alternate servers."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:142
|
||||
msgid ""
|
||||
"The ``--show-response`` option displays the full response text from the PyPI "
|
||||
"server, which is useful when debugging problems with registering and "
|
||||
"uploading."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:153
|
||||
msgid "The ``.pypirc`` file"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:155
|
||||
msgid ""
|
||||
"The :command:`register` and :command:`upload` commands both check for the "
|
||||
"existence of a :file:`.pypirc` file at the location :file:`$HOME/.pypirc`. "
|
||||
"If this file exists, the command uses the username, password, and repository "
|
||||
"URL configured in the file. The format of a :file:`.pypirc` file is as "
|
||||
"follows::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:170
|
||||
msgid ""
|
||||
"The *distutils* section defines an *index-servers* variable that lists the "
|
||||
"name of all sections describing a repository."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:173
|
||||
msgid "Each section describing a repository defines three variables:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:175
|
||||
msgid "*repository*, that defines the url of the PyPI server. Defaults to"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:176
|
||||
msgid "``https://www.python.org/pypi``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:177
|
||||
msgid "*username*, which is the registered username on the PyPI server."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:179
|
||||
msgid "*password*, that will be used to authenticate. If omitted the user"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:179
|
||||
msgid "will be prompt to type it when needed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:181
|
||||
msgid ""
|
||||
"If you want to define another server a new section can be created and listed "
|
||||
"in the *index-servers* variable::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:199
|
||||
msgid ""
|
||||
"This allows the :command:`register` and :command:`upload` commands to be "
|
||||
"called with the ``--repository`` option as described in :ref:`package-"
|
||||
"cmdoptions`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:203
|
||||
msgid ""
|
||||
"Specifically, you might want to add the `PyPI Test Repository <https://wiki."
|
||||
"python.org/moin/TestPyPI>`_ to your ``.pypirc`` to facilitate testing before "
|
||||
"doing your first upload to ``PyPI`` itself."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:211
|
||||
msgid "PyPI package display"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:213
|
||||
msgid ""
|
||||
"The ``long_description`` field plays a special role at PyPI. It is used by "
|
||||
"the server to display a home page for the registered package."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:216
|
||||
msgid ""
|
||||
"If you use the `reStructuredText <http://docutils.sourceforge.net/rst."
|
||||
"html>`_ syntax for this field, PyPI will parse it and display an HTML output "
|
||||
"for the package home page."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:220
|
||||
msgid ""
|
||||
"The ``long_description`` field can be attached to a text file located in the "
|
||||
"package::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:231
|
||||
msgid ""
|
||||
"In that case, :file:`README.txt` is a regular reStructuredText text file "
|
||||
"located in the root of the package besides :file:`setup.py`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:234
|
||||
msgid ""
|
||||
"To prevent registering broken reStructuredText content, you can use the :"
|
||||
"program:`rst2html` program that is provided by the :mod:`docutils` package "
|
||||
"and check the ``long_description`` from the command line:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/packageindex.rst:242
|
||||
msgid ""
|
||||
":mod:`docutils` will display a warning if there's something wrong with your "
|
||||
"syntax. Because PyPI applies additional checks (e.g. by passing ``--no-"
|
||||
"raw`` to ``rst2html.py`` in the command above), being able to run the "
|
||||
"command above without warnings does not guarantee that PyPI will convert the "
|
||||
"content successfully."
|
||||
msgstr ""
|
|
@ -0,0 +1,999 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:5
|
||||
msgid "Writing the Setup Script"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:7
|
||||
msgid ""
|
||||
"The setup script is the centre of all activity in building, distributing, "
|
||||
"and installing modules using the Distutils. The main purpose of the setup "
|
||||
"script is to describe your module distribution to the Distutils, so that the "
|
||||
"various commands that operate on your modules do the right thing. As we saw "
|
||||
"in section :ref:`distutils-simple-example` above, the setup script consists "
|
||||
"mainly of a call to :func:`setup`, and most information supplied to the "
|
||||
"Distutils by the module developer is supplied as keyword arguments to :func:"
|
||||
"`setup`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:15
|
||||
msgid ""
|
||||
"Here's a slightly more involved example, which we'll follow for the next "
|
||||
"couple of sections: the Distutils' own setup script. (Keep in mind that "
|
||||
"although the Distutils are included with Python 1.6 and later, they also "
|
||||
"have an independent existence so that Python 1.5.2 users can use them to "
|
||||
"install other module distributions. The Distutils' own setup script, shown "
|
||||
"here, is used to install the package into Python 1.5.2.) ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:35
|
||||
msgid ""
|
||||
"There are only two differences between this and the trivial one-file "
|
||||
"distribution presented in section :ref:`distutils-simple-example`: more "
|
||||
"metadata, and the specification of pure Python modules by package, rather "
|
||||
"than by module. This is important since the Distutils consist of a couple "
|
||||
"of dozen modules split into (so far) two packages; an explicit list of every "
|
||||
"module would be tedious to generate and difficult to maintain. For more "
|
||||
"information on the additional meta-data, see section :ref:`meta-data`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:43
|
||||
msgid ""
|
||||
"Note that any pathnames (files or directories) supplied in the setup script "
|
||||
"should be written using the Unix convention, i.e. slash-separated. The "
|
||||
"Distutils will take care of converting this platform-neutral representation "
|
||||
"into whatever is appropriate on your current platform before actually using "
|
||||
"the pathname. This makes your setup script portable across operating "
|
||||
"systems, which of course is one of the major goals of the Distutils. In "
|
||||
"this spirit, all pathnames in this document are slash-separated."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:51
|
||||
msgid ""
|
||||
"This, of course, only applies to pathnames given to Distutils functions. If "
|
||||
"you, for example, use standard Python functions such as :func:`glob.glob` "
|
||||
"or :func:`os.listdir` to specify files, you should be careful to write "
|
||||
"portable code instead of hardcoding path separators::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:63
|
||||
msgid "Listing whole packages"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:65
|
||||
msgid ""
|
||||
"The ``packages`` option tells the Distutils to process (build, distribute, "
|
||||
"install, etc.) all pure Python modules found in each package mentioned in "
|
||||
"the ``packages`` list. In order to do this, of course, there has to be a "
|
||||
"correspondence between package names and directories in the filesystem. The "
|
||||
"default correspondence is the most obvious one, i.e. package :mod:"
|
||||
"`distutils` is found in the directory :file:`distutils` relative to the "
|
||||
"distribution root. Thus, when you say ``packages = ['foo']`` in your setup "
|
||||
"script, you are promising that the Distutils will find a file :file:`foo/"
|
||||
"__init__.py` (which might be spelled differently on your system, but you get "
|
||||
"the idea) relative to the directory where your setup script lives. If you "
|
||||
"break this promise, the Distutils will issue a warning but still process the "
|
||||
"broken package anyway."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:77
|
||||
msgid ""
|
||||
"If you use a different convention to lay out your source directory, that's "
|
||||
"no problem: you just have to supply the ``package_dir`` option to tell the "
|
||||
"Distutils about your convention. For example, say you keep all Python "
|
||||
"source under :file:`lib`, so that modules in the \"root package\" (i.e., not "
|
||||
"in any package at all) are in :file:`lib`, modules in the :mod:`foo` package "
|
||||
"are in :file:`lib/foo`, and so forth. Then you would put ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:86
|
||||
msgid ""
|
||||
"in your setup script. The keys to this dictionary are package names, and an "
|
||||
"empty package name stands for the root package. The values are directory "
|
||||
"names relative to your distribution root. In this case, when you say "
|
||||
"``packages = ['foo']``, you are promising that the file :file:`lib/foo/"
|
||||
"__init__.py` exists."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:91
|
||||
msgid ""
|
||||
"Another possible convention is to put the :mod:`foo` package right in :file:"
|
||||
"`lib`, the :mod:`foo.bar` package in :file:`lib/bar`, etc. This would be "
|
||||
"written in the setup script as ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:97
|
||||
msgid ""
|
||||
"A ``package: dir`` entry in the ``package_dir`` dictionary implicitly "
|
||||
"applies to all packages below *package*, so the :mod:`foo.bar` case is "
|
||||
"automatically handled here. In this example, having ``packages = ['foo', "
|
||||
"'foo.bar']`` tells the Distutils to look for :file:`lib/__init__.py` and :"
|
||||
"file:`lib/bar/__init__.py`. (Keep in mind that although ``package_dir`` "
|
||||
"applies recursively, you must explicitly list all packages in ``packages``: "
|
||||
"the Distutils will *not* recursively scan your source tree looking for any "
|
||||
"directory with an :file:`__init__.py` file.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:110
|
||||
msgid "Listing individual modules"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:112
|
||||
msgid ""
|
||||
"For a small module distribution, you might prefer to list all modules rather "
|
||||
"than listing packages---especially the case of a single module that goes in "
|
||||
"the \"root package\" (i.e., no package at all). This simplest case was "
|
||||
"shown in section :ref:`distutils-simple-example`; here is a slightly more "
|
||||
"involved example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:119
|
||||
msgid ""
|
||||
"This describes two modules, one of them in the \"root\" package, the other "
|
||||
"in the :mod:`pkg` package. Again, the default package/directory layout "
|
||||
"implies that these two modules can be found in :file:`mod1.py` and :file:"
|
||||
"`pkg/mod2.py`, and that :file:`pkg/__init__.py` exists as well. And again, "
|
||||
"you can override the package/directory correspondence using the "
|
||||
"``package_dir`` option."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:129
|
||||
msgid "Describing extension modules"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:131
|
||||
msgid ""
|
||||
"Just as writing Python extension modules is a bit more complicated than "
|
||||
"writing pure Python modules, describing them to the Distutils is a bit more "
|
||||
"complicated. Unlike pure modules, it's not enough just to list modules or "
|
||||
"packages and expect the Distutils to go out and find the right files; you "
|
||||
"have to specify the extension name, source file(s), and any compile/link "
|
||||
"requirements (include directories, libraries to link with, etc.)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:140
|
||||
msgid ""
|
||||
"All of this is done through another keyword argument to :func:`setup`, the "
|
||||
"``ext_modules`` option. ``ext_modules`` is just a list of :class:"
|
||||
"`~distutils.core.Extension` instances, each of which describes a single "
|
||||
"extension module. Suppose your distribution includes a single extension, "
|
||||
"called :mod:`foo` and implemented by :file:`foo.c`. If no additional "
|
||||
"instructions to the compiler/linker are needed, describing this extension is "
|
||||
"quite simple::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:150
|
||||
msgid ""
|
||||
"The :class:`Extension` class can be imported from :mod:`distutils.core` "
|
||||
"along with :func:`setup`. Thus, the setup script for a module distribution "
|
||||
"that contains only this one extension and nothing else might be::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:160
|
||||
msgid ""
|
||||
"The :class:`Extension` class (actually, the underlying extension-building "
|
||||
"machinery implemented by the :command:`build_ext` command) supports a great "
|
||||
"deal of flexibility in describing Python extensions, which is explained in "
|
||||
"the following sections."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:167
|
||||
msgid "Extension names and packages"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:169
|
||||
msgid ""
|
||||
"The first argument to the :class:`~distutils.core.Extension` constructor is "
|
||||
"always the name of the extension, including any package names. For "
|
||||
"example, ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:174
|
||||
msgid "describes an extension that lives in the root package, while ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:178
|
||||
msgid ""
|
||||
"describes the same extension in the :mod:`pkg` package. The source files "
|
||||
"and resulting object code are identical in both cases; the only difference "
|
||||
"is where in the filesystem (and therefore where in Python's namespace "
|
||||
"hierarchy) the resulting extension lives."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:183
|
||||
msgid ""
|
||||
"If you have a number of extensions all in the same package (or all under the "
|
||||
"same base package), use the ``ext_package`` keyword argument to :func:"
|
||||
"`setup`. For example, ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:193
|
||||
msgid ""
|
||||
"will compile :file:`foo.c` to the extension :mod:`pkg.foo`, and :file:`bar."
|
||||
"c` to :mod:`pkg.subpkg.bar`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:198
|
||||
msgid "Extension source files"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:200
|
||||
msgid ""
|
||||
"The second argument to the :class:`~distutils.core.Extension` constructor is "
|
||||
"a list of source files. Since the Distutils currently only support C, C++, "
|
||||
"and Objective-C extensions, these are normally C/C++/Objective-C source "
|
||||
"files. (Be sure to use appropriate extensions to distinguish C++\\ source "
|
||||
"files: :file:`.cc` and :file:`.cpp` seem to be recognized by both Unix and "
|
||||
"Windows compilers.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:207
|
||||
msgid ""
|
||||
"However, you can also include SWIG interface (:file:`.i`) files in the list; "
|
||||
"the :command:`build_ext` command knows how to deal with SWIG extensions: it "
|
||||
"will run SWIG on the interface file and compile the resulting C/C++ file "
|
||||
"into your extension."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:214
|
||||
msgid ""
|
||||
"This warning notwithstanding, options to SWIG can be currently passed like "
|
||||
"this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:223
|
||||
msgid "Or on the commandline like this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:227
|
||||
msgid ""
|
||||
"On some platforms, you can include non-source files that are processed by "
|
||||
"the compiler and included in your extension. Currently, this just means "
|
||||
"Windows message text (:file:`.mc`) files and resource definition (:file:`."
|
||||
"rc`) files for Visual C++. These will be compiled to binary resource (:file:"
|
||||
"`.res`) files and linked into the executable."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:235
|
||||
msgid "Preprocessor options"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:237
|
||||
msgid ""
|
||||
"Three optional arguments to :class:`~distutils.core.Extension` will help if "
|
||||
"you need to specify include directories to search or preprocessor macros to "
|
||||
"define/undefine: ``include_dirs``, ``define_macros``, and ``undef_macros``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:241
|
||||
msgid ""
|
||||
"For example, if your extension requires header files in the :file:`include` "
|
||||
"directory under your distribution root, use the ``include_dirs`` option::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:246
|
||||
msgid ""
|
||||
"You can specify absolute directories there; if you know that your extension "
|
||||
"will only be built on Unix systems with X11R6 installed to :file:`/usr`, you "
|
||||
"can get away with ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:252
|
||||
msgid ""
|
||||
"You should avoid this sort of non-portable usage if you plan to distribute "
|
||||
"your code: it's probably better to write C code like ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:257
|
||||
msgid ""
|
||||
"If you need to include header files from some other Python extension, you "
|
||||
"can take advantage of the fact that header files are installed in a "
|
||||
"consistent way by the Distutils :command:`install_headers` command. For "
|
||||
"example, the Numerical Python header files are installed (on a standard Unix "
|
||||
"installation) to :file:`/usr/local/include/python1.5/Numerical`. (The exact "
|
||||
"location will differ according to your platform and Python installation.) "
|
||||
"Since the Python include directory---\\ :file:`/usr/local/include/python1.5` "
|
||||
"in this case---is always included in the search path when building Python "
|
||||
"extensions, the best approach is to write C code like ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:269
|
||||
msgid ""
|
||||
"If you must put the :file:`Numerical` include directory right into your "
|
||||
"header search path, though, you can find that directory using the Distutils :"
|
||||
"mod:`distutils.sysconfig` module::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:279
|
||||
msgid ""
|
||||
"Even though this is quite portable---it will work on any Python "
|
||||
"installation, regardless of platform---it's probably easier to just write "
|
||||
"your C code in the sensible way."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:283
|
||||
msgid ""
|
||||
"You can define and undefine pre-processor macros with the ``define_macros`` "
|
||||
"and ``undef_macros`` options. ``define_macros`` takes a list of ``(name, "
|
||||
"value)`` tuples, where ``name`` is the name of the macro to define (a "
|
||||
"string) and ``value`` is its value: either a string or ``None``. (Defining "
|
||||
"a macro ``FOO`` to ``None`` is the equivalent of a bare ``#define FOO`` in "
|
||||
"your C source: with most compilers, this sets ``FOO`` to the string ``1``.) "
|
||||
"``undef_macros`` is just a list of macros to undefine."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:291
|
||||
msgid "For example::"
|
||||
msgstr "Par exemple : ::"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:298
|
||||
msgid "is the equivalent of having this at the top of every C source file::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:307
|
||||
msgid "Library options"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:309
|
||||
msgid ""
|
||||
"You can also specify the libraries to link against when building your "
|
||||
"extension, and the directories to search for those libraries. The "
|
||||
"``libraries`` option is a list of libraries to link against, "
|
||||
"``library_dirs`` is a list of directories to search for libraries at link-"
|
||||
"time, and ``runtime_library_dirs`` is a list of directories to search for "
|
||||
"shared (dynamically loaded) libraries at run-time."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:315
|
||||
msgid ""
|
||||
"For example, if you need to link against libraries known to be in the "
|
||||
"standard library search path on target systems ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:321
|
||||
msgid ""
|
||||
"If you need to link with libraries in a non-standard location, you'll have "
|
||||
"to include the location in ``library_dirs``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:328
|
||||
msgid ""
|
||||
"(Again, this sort of non-portable construct should be avoided if you intend "
|
||||
"to distribute your code.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:335
|
||||
msgid "Other options"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:337
|
||||
msgid ""
|
||||
"There are still some other options which can be used to handle special cases."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:339
|
||||
msgid ""
|
||||
"The ``optional`` option is a boolean; if it is true, a build failure in the "
|
||||
"extension will not abort the build process, but instead simply not install "
|
||||
"the failing extension."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:343
|
||||
msgid ""
|
||||
"The ``extra_objects`` option is a list of object files to be passed to the "
|
||||
"linker. These files must not have extensions, as the default extension for "
|
||||
"the compiler is used."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:347
|
||||
msgid ""
|
||||
"``extra_compile_args`` and ``extra_link_args`` can be used to specify "
|
||||
"additional command line options for the respective compiler and linker "
|
||||
"command lines."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:351
|
||||
msgid ""
|
||||
"``export_symbols`` is only useful on Windows. It can contain a list of "
|
||||
"symbols (functions or variables) to be exported. This option is not needed "
|
||||
"when building compiled extensions: Distutils will automatically add "
|
||||
"``initmodule`` to the list of exported symbols."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:356
|
||||
msgid ""
|
||||
"The ``depends`` option is a list of files that the extension depends on (for "
|
||||
"example header files). The build command will call the compiler on the "
|
||||
"sources to rebuild extension if any on this files has been modified since "
|
||||
"the previous build."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:362
|
||||
msgid "Relationships between Distributions and Packages"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:364
|
||||
msgid "A distribution may relate to packages in three specific ways:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:366
|
||||
msgid "It can require packages or modules."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:368
|
||||
msgid "It can provide packages or modules."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:370
|
||||
msgid "It can obsolete packages or modules."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:372
|
||||
msgid ""
|
||||
"These relationships can be specified using keyword arguments to the :func:"
|
||||
"`distutils.core.setup` function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:375
|
||||
msgid ""
|
||||
"Dependencies on other Python modules and packages can be specified by "
|
||||
"supplying the *requires* keyword argument to :func:`setup`. The value must "
|
||||
"be a list of strings. Each string specifies a package that is required, and "
|
||||
"optionally what versions are sufficient."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:380
|
||||
msgid ""
|
||||
"To specify that any version of a module or package is required, the string "
|
||||
"should consist entirely of the module or package name. Examples include "
|
||||
"``'mymodule'`` and ``'xml.parsers.expat'``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:384
|
||||
msgid ""
|
||||
"If specific versions are required, a sequence of qualifiers can be supplied "
|
||||
"in parentheses. Each qualifier may consist of a comparison operator and a "
|
||||
"version number. The accepted comparison operators are::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:391
|
||||
msgid ""
|
||||
"These can be combined by using multiple qualifiers separated by commas (and "
|
||||
"optional whitespace). In this case, all of the qualifiers must be matched; "
|
||||
"a logical AND is used to combine the evaluations."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:395
|
||||
msgid "Let's look at a bunch of examples:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:398
|
||||
msgid "Requires Expression"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:398 ../Doc/distutils/setupscript.rst:416
|
||||
msgid "Explanation"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:400
|
||||
msgid "``==1.0``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:400
|
||||
msgid "Only version ``1.0`` is compatible"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:402
|
||||
msgid "``>1.0, !=1.5.1, <2.0``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:402
|
||||
msgid ""
|
||||
"Any version after ``1.0`` and before ``2.0`` is compatible, except ``1.5.1``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:406
|
||||
msgid ""
|
||||
"Now that we can specify dependencies, we also need to be able to specify "
|
||||
"what we provide that other distributions can require. This is done using "
|
||||
"the *provides* keyword argument to :func:`setup`. The value for this keyword "
|
||||
"is a list of strings, each of which names a Python module or package, and "
|
||||
"optionally identifies the version. If the version is not specified, it is "
|
||||
"assumed to match that of the distribution."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:413
|
||||
msgid "Some examples:"
|
||||
msgstr "Quelques exemples :"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:416
|
||||
msgid "Provides Expression"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:418
|
||||
msgid "``mypkg``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:418
|
||||
msgid "Provide ``mypkg``, using the distribution version"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:421
|
||||
msgid "``mypkg (1.1)``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:421
|
||||
msgid "Provide ``mypkg`` version 1.1, regardless of the distribution version"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:425
|
||||
msgid ""
|
||||
"A package can declare that it obsoletes other packages using the *obsoletes* "
|
||||
"keyword argument. The value for this is similar to that of the *requires* "
|
||||
"keyword: a list of strings giving module or package specifiers. Each "
|
||||
"specifier consists of a module or package name optionally followed by one or "
|
||||
"more version qualifiers. Version qualifiers are given in parentheses after "
|
||||
"the module or package name."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:432
|
||||
msgid ""
|
||||
"The versions identified by the qualifiers are those that are obsoleted by "
|
||||
"the distribution being described. If no qualifiers are given, all versions "
|
||||
"of the named module or package are understood to be obsoleted."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:439
|
||||
msgid "Installing Scripts"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:441
|
||||
msgid ""
|
||||
"So far we have been dealing with pure and non-pure Python modules, which are "
|
||||
"usually not run by themselves but imported by scripts."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:444
|
||||
msgid ""
|
||||
"Scripts are files containing Python source code, intended to be started from "
|
||||
"the command line. Scripts don't require Distutils to do anything very "
|
||||
"complicated. The only clever feature is that if the first line of the script "
|
||||
"starts with ``#!`` and contains the word \"python\", the Distutils will "
|
||||
"adjust the first line to refer to the current interpreter location. By "
|
||||
"default, it is replaced with the current interpreter location. The :option:"
|
||||
"`--executable` (or :option:`-e`) option will allow the interpreter path to "
|
||||
"be explicitly overridden."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:452
|
||||
msgid ""
|
||||
"The ``scripts`` option simply is a list of files to be handled in this way. "
|
||||
"From the PyXML setup script::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:459
|
||||
msgid ""
|
||||
"All the scripts will also be added to the ``MANIFEST`` file if no template "
|
||||
"is provided. See :ref:`manifest`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:467
|
||||
msgid "Installing Package Data"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:469
|
||||
msgid ""
|
||||
"Often, additional files need to be installed into a package. These files "
|
||||
"are often data that's closely related to the package's implementation, or "
|
||||
"text files containing documentation that might be of interest to programmers "
|
||||
"using the package. These files are called :dfn:`package data`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:474
|
||||
msgid ""
|
||||
"Package data can be added to packages using the ``package_data`` keyword "
|
||||
"argument to the :func:`setup` function. The value must be a mapping from "
|
||||
"package name to a list of relative path names that should be copied into the "
|
||||
"package. The paths are interpreted as relative to the directory containing "
|
||||
"the package (information from the ``package_dir`` mapping is used if "
|
||||
"appropriate); that is, the files are expected to be part of the package in "
|
||||
"the source directories. They may contain glob patterns as well."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:482
|
||||
msgid ""
|
||||
"The path names may contain directory portions; any necessary directories "
|
||||
"will be created in the installation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:485
|
||||
msgid ""
|
||||
"For example, if a package should contain a subdirectory with several data "
|
||||
"files, the files can be arranged like this in the source tree::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:498
|
||||
msgid "The corresponding call to :func:`setup` might be::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:507
|
||||
msgid ""
|
||||
"All the files that match ``package_data`` will be added to the ``MANIFEST`` "
|
||||
"file if no template is provided. See :ref:`manifest`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:515
|
||||
msgid "Installing Additional Files"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:517
|
||||
msgid ""
|
||||
"The ``data_files`` option can be used to specify additional files needed by "
|
||||
"the module distribution: configuration files, message catalogs, data files, "
|
||||
"anything which doesn't fit in the previous categories."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:521
|
||||
msgid ""
|
||||
"``data_files`` specifies a sequence of (*directory*, *files*) pairs in the "
|
||||
"following way::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:530
|
||||
msgid ""
|
||||
"Note that you can specify the directory names where the data files will be "
|
||||
"installed, but you cannot rename the data files themselves."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:533
|
||||
msgid ""
|
||||
"Each (*directory*, *files*) pair in the sequence specifies the installation "
|
||||
"directory and the files to install there. If *directory* is a relative "
|
||||
"path, it is interpreted relative to the installation prefix (Python's ``sys."
|
||||
"prefix`` for pure-Python packages, ``sys.exec_prefix`` for packages that "
|
||||
"contain extension modules). Each file name in *files* is interpreted "
|
||||
"relative to the :file:`setup.py` script at the top of the package source "
|
||||
"distribution. No directory information from *files* is used to determine "
|
||||
"the final location of the installed file; only the name of the file is used."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:542
|
||||
msgid ""
|
||||
"You can specify the ``data_files`` options as a simple sequence of files "
|
||||
"without specifying a target directory, but this is not recommended, and the :"
|
||||
"command:`install` command will print a warning in this case. To install data "
|
||||
"files directly in the target directory, an empty string should be given as "
|
||||
"the directory."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:548
|
||||
msgid ""
|
||||
"All the files that match ``data_files`` will be added to the ``MANIFEST`` "
|
||||
"file if no template is provided. See :ref:`manifest`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:556
|
||||
msgid "Additional meta-data"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:558
|
||||
msgid ""
|
||||
"The setup script may include additional meta-data beyond the name and "
|
||||
"version. This information includes:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:562
|
||||
msgid "Meta-Data"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:562
|
||||
msgid "Description"
|
||||
msgstr "Description"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:562
|
||||
msgid "Value"
|
||||
msgstr "Valeur"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:562
|
||||
msgid "Notes"
|
||||
msgstr "Notes"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:564
|
||||
msgid "``name``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:564
|
||||
msgid "name of the package"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:564 ../Doc/distutils/setupscript.rst:566
|
||||
#: ../Doc/distutils/setupscript.rst:568 ../Doc/distutils/setupscript.rst:573
|
||||
#: ../Doc/distutils/setupscript.rst:580 ../Doc/distutils/setupscript.rst:594
|
||||
msgid "short string"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:564 ../Doc/distutils/setupscript.rst:578
|
||||
msgid "\\(1)"
|
||||
msgstr "\\(1)"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:566
|
||||
msgid "``version``"
|
||||
msgstr "``version``"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:566
|
||||
msgid "version of this release"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:566
|
||||
msgid "(1)(2)"
|
||||
msgstr "(1)(2)"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:568
|
||||
msgid "``author``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:568
|
||||
msgid "package author's name"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:568 ../Doc/distutils/setupscript.rst:570
|
||||
#: ../Doc/distutils/setupscript.rst:573 ../Doc/distutils/setupscript.rst:575
|
||||
msgid "\\(3)"
|
||||
msgstr "\\(3)"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:570
|
||||
msgid "``author_email``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:570
|
||||
msgid "email address of the package author"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:570 ../Doc/distutils/setupscript.rst:575
|
||||
msgid "email address"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:573
|
||||
msgid "``maintainer``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:573
|
||||
msgid "package maintainer's name"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:575
|
||||
msgid "``maintainer_email``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:575
|
||||
msgid "email address of the package maintainer"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:578
|
||||
msgid "``url``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:578
|
||||
msgid "home page for the package"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:578 ../Doc/distutils/setupscript.rst:587
|
||||
msgid "URL"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:580
|
||||
msgid "``description``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:580
|
||||
msgid "short, summary description of the package"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:584
|
||||
msgid "``long_description``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:584
|
||||
msgid "longer description of the package"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:584
|
||||
msgid "long string"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:584
|
||||
msgid "\\(5)"
|
||||
msgstr "\\(5)"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:587
|
||||
msgid "``download_url``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:587
|
||||
msgid "location where the package may be downloaded"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:587 ../Doc/distutils/setupscript.rst:590
|
||||
msgid "\\(4)"
|
||||
msgstr "\\(4)"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:590
|
||||
msgid "``classifiers``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:590
|
||||
msgid "a list of classifiers"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:590 ../Doc/distutils/setupscript.rst:592
|
||||
msgid "list of strings"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:592
|
||||
msgid "``platforms``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:592
|
||||
msgid "a list of platforms"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:594
|
||||
msgid "``license``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:594
|
||||
msgid "license for the package"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:594
|
||||
msgid "\\(6)"
|
||||
msgstr "\\(6)"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:597
|
||||
msgid "Notes:"
|
||||
msgstr "Notes : "
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:600
|
||||
msgid "These fields are required."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:603
|
||||
msgid ""
|
||||
"It is recommended that versions take the form *major.minor[.patch[.sub]]*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:606
|
||||
msgid ""
|
||||
"Either the author or the maintainer must be identified. If maintainer is "
|
||||
"provided, distutils lists it as the author in :file:`PKG-INFO`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:610
|
||||
msgid ""
|
||||
"These fields should not be used if your package is to be compatible with "
|
||||
"Python versions prior to 2.2.3 or 2.3. The list is available from the `PyPI "
|
||||
"website <https://pypi.python.org/pypi>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:615
|
||||
msgid ""
|
||||
"The ``long_description`` field is used by PyPI when you are :ref:"
|
||||
"`registering <package-register>` a package, to :ref:`build its home page "
|
||||
"<package-display>`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:620
|
||||
msgid ""
|
||||
"The ``license`` field is a text indicating the license covering the package "
|
||||
"where the license is not a selection from the \"License\" Trove classifiers. "
|
||||
"See the ``Classifier`` field. Notice that there's a ``licence`` distribution "
|
||||
"option which is deprecated but still acts as an alias for ``license``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:627
|
||||
msgid "'short string'"
|
||||
msgstr "'chaîne courte'"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:627
|
||||
msgid "A single line of text, not more than 200 characters."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:631
|
||||
msgid "'long string'"
|
||||
msgstr "'chaîne longue'"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:630
|
||||
msgid ""
|
||||
"Multiple lines of plain text in reStructuredText format (see http://docutils."
|
||||
"sourceforge.net/)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:634
|
||||
msgid "'list of strings'"
|
||||
msgstr "'liste de chaînes'"
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:634
|
||||
msgid "See below."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:636
|
||||
msgid ""
|
||||
"Encoding the version information is an art in itself. Python packages "
|
||||
"generally adhere to the version format *major.minor[.patch][sub]*. The major "
|
||||
"number is 0 for initial, experimental releases of software. It is "
|
||||
"incremented for releases that represent major milestones in a package. The "
|
||||
"minor number is incremented when important new features are added to the "
|
||||
"package. The patch number increments when bug-fix releases are made. "
|
||||
"Additional trailing version information is sometimes used to indicate sub-"
|
||||
"releases. These are \"a1,a2,...,aN\" (for alpha releases, where "
|
||||
"functionality and API may change), \"b1,b2,...,bN\" (for beta releases, "
|
||||
"which only fix bugs) and \"pr1,pr2,...,prN\" (for final pre-release release "
|
||||
"testing). Some examples:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:648
|
||||
msgid "0.1.0"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:648
|
||||
msgid "the first, experimental release of a package"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:651
|
||||
msgid "1.0.1a2"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:651
|
||||
msgid "the second alpha release of the first patch version of 1.0"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:653
|
||||
msgid "``classifiers`` are specified in a Python list::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:677
|
||||
msgid "Debugging the setup script"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:679
|
||||
msgid ""
|
||||
"Sometimes things go wrong, and the setup script doesn't do what the "
|
||||
"developer wants."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:682
|
||||
msgid ""
|
||||
"Distutils catches any exceptions when running the setup script, and print a "
|
||||
"simple error message before the script is terminated. The motivation for "
|
||||
"this behaviour is to not confuse administrators who don't know much about "
|
||||
"Python and are trying to install a package. If they get a big long "
|
||||
"traceback from deep inside the guts of Distutils, they may think the package "
|
||||
"or the Python installation is broken because they don't read all the way "
|
||||
"down to the bottom and see that it's a permission problem."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/setupscript.rst:690
|
||||
msgid ""
|
||||
"On the other hand, this doesn't help the developer to find the cause of the "
|
||||
"failure. For this purpose, the :envvar:`DISTUTILS_DEBUG` environment "
|
||||
"variable can be set to anything except an empty string, and distutils will "
|
||||
"now print detailed information about what it is doing, dump the full "
|
||||
"traceback when an exception occurs, and print the whole command line when an "
|
||||
"external program (like a C compiler) fails."
|
||||
msgstr ""
|
|
@ -0,0 +1,413 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:5
|
||||
msgid "Creating a Source Distribution"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:7
|
||||
msgid ""
|
||||
"As shown in section :ref:`distutils-simple-example`, you use the :command:"
|
||||
"`sdist` command to create a source distribution. In the simplest case, ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:12
|
||||
msgid ""
|
||||
"(assuming you haven't specified any :command:`sdist` options in the setup "
|
||||
"script or config file), :command:`sdist` creates the archive of the default "
|
||||
"format for the current platform. The default format is a gzip'ed tar file (:"
|
||||
"file:`.tar.gz`) on Unix, and ZIP file on Windows."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:17
|
||||
msgid ""
|
||||
"You can specify as many formats as you like using the :option:`--formats` "
|
||||
"option, for example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:22
|
||||
msgid "to create a gzipped tarball and a zip file. The available formats are:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:25
|
||||
msgid "Format"
|
||||
msgstr "Format"
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:25
|
||||
msgid "Description"
|
||||
msgstr "Description"
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:25
|
||||
msgid "Notes"
|
||||
msgstr "Notes"
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:27
|
||||
msgid "``zip``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:27
|
||||
msgid "zip file (:file:`.zip`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:27
|
||||
msgid "(1),(3)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:29
|
||||
msgid "``gztar``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:29
|
||||
msgid "gzip'ed tar file (:file:`.tar.gz`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:29
|
||||
msgid "\\(2)"
|
||||
msgstr "\\(2)"
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:32
|
||||
msgid "``bztar``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:32
|
||||
msgid "bzip2'ed tar file (:file:`.tar.bz2`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:35
|
||||
msgid "``xztar``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:35
|
||||
msgid "xz'ed tar file (:file:`.tar.xz`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:38
|
||||
msgid "``ztar``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:38
|
||||
msgid "compressed tar file (:file:`.tar.Z`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:38
|
||||
msgid "\\(4)"
|
||||
msgstr "\\(4)"
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:41
|
||||
msgid "``tar``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:41
|
||||
msgid "tar file (:file:`.tar`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:44
|
||||
msgid "Added support for the ``xztar`` format."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:47
|
||||
msgid "Notes:"
|
||||
msgstr "Notes : "
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:50
|
||||
msgid "default on Windows"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:53
|
||||
msgid "default on Unix"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:56
|
||||
msgid ""
|
||||
"requires either external :program:`zip` utility or :mod:`zipfile` module "
|
||||
"(part of the standard Python library since Python 1.6)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:60
|
||||
msgid ""
|
||||
"requires the :program:`compress` program. Notice that this format is now "
|
||||
"pending for deprecation and will be removed in the future versions of Python."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:63
|
||||
msgid ""
|
||||
"When using any ``tar`` format (``gztar``, ``bztar``, ``xztar``, ``ztar`` or "
|
||||
"``tar``), under Unix you can specify the ``owner`` and ``group`` names that "
|
||||
"will be set for each member of the archive."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:67
|
||||
msgid "For example, if you want all files of the archive to be owned by root::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:75
|
||||
msgid "Specifying the files to distribute"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:77
|
||||
msgid ""
|
||||
"If you don't supply an explicit list of files (or instructions on how to "
|
||||
"generate one), the :command:`sdist` command puts a minimal default set into "
|
||||
"the source distribution:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:81
|
||||
msgid ""
|
||||
"all Python source files implied by the ``py_modules`` and ``packages`` "
|
||||
"options"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:84
|
||||
msgid ""
|
||||
"all C source files mentioned in the ``ext_modules`` or ``libraries`` options"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:90
|
||||
msgid ""
|
||||
"scripts identified by the ``scripts`` option See :ref:`distutils-installing-"
|
||||
"scripts`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:93
|
||||
msgid ""
|
||||
"anything that looks like a test script: :file:`test/test\\*.py` (currently, "
|
||||
"the Distutils don't do anything with test scripts except include them in "
|
||||
"source distributions, but in the future there will be a standard for testing "
|
||||
"Python module distributions)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:98
|
||||
msgid ""
|
||||
":file:`README.txt` (or :file:`README`), :file:`setup.py` (or whatever you "
|
||||
"called your setup script), and :file:`setup.cfg`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:101
|
||||
msgid ""
|
||||
"all files that matches the ``package_data`` metadata. See :ref:`distutils-"
|
||||
"installing-package-data`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:104
|
||||
msgid ""
|
||||
"all files that matches the ``data_files`` metadata. See :ref:`distutils-"
|
||||
"additional-files`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:107
|
||||
msgid ""
|
||||
"Sometimes this is enough, but usually you will want to specify additional "
|
||||
"files to distribute. The typical way to do this is to write a *manifest "
|
||||
"template*, called :file:`MANIFEST.in` by default. The manifest template is "
|
||||
"just a list of instructions for how to generate your manifest file, :file:"
|
||||
"`MANIFEST`, which is the exact list of files to include in your source "
|
||||
"distribution. The :command:`sdist` command processes this template and "
|
||||
"generates a manifest based on its instructions and what it finds in the "
|
||||
"filesystem."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:115
|
||||
msgid ""
|
||||
"If you prefer to roll your own manifest file, the format is simple: one "
|
||||
"filename per line, regular files (or symlinks to them) only. If you do "
|
||||
"supply your own :file:`MANIFEST`, you must specify everything: the default "
|
||||
"set of files described above does not apply in this case."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:120
|
||||
msgid ""
|
||||
"An existing generated :file:`MANIFEST` will be regenerated without :command:"
|
||||
"`sdist` comparing its modification time to the one of :file:`MANIFEST.in` "
|
||||
"or :file:`setup.py`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:125
|
||||
msgid ""
|
||||
":file:`MANIFEST` files start with a comment indicating they are generated. "
|
||||
"Files without this comment are not overwritten or removed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:129
|
||||
msgid ""
|
||||
":command:`sdist` will read a :file:`MANIFEST` file if no :file:`MANIFEST.in` "
|
||||
"exists, like it used to do."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:134
|
||||
msgid ""
|
||||
"The manifest template has one command per line, where each command specifies "
|
||||
"a set of files to include or exclude from the source distribution. For an "
|
||||
"example, again we turn to the Distutils' own manifest template:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:144
|
||||
msgid ""
|
||||
"The meanings should be fairly clear: include all files in the distribution "
|
||||
"root matching :file:`\\*.txt`, all files anywhere under the :file:`examples` "
|
||||
"directory matching :file:`\\*.txt` or :file:`\\*.py`, and exclude all "
|
||||
"directories matching :file:`examples/sample?/build`. All of this is done "
|
||||
"*after* the standard include set, so you can exclude files from the standard "
|
||||
"set with explicit instructions in the manifest template. (Or, you can use "
|
||||
"the :option:`--no-defaults` option to disable the standard set entirely.) "
|
||||
"There are several other commands available in the manifest template mini-"
|
||||
"language; see section :ref:`sdist-cmd`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:154
|
||||
msgid ""
|
||||
"The order of commands in the manifest template matters: initially, we have "
|
||||
"the list of default files as described above, and each command in the "
|
||||
"template adds to or removes from that list of files. Once we have fully "
|
||||
"processed the manifest template, we remove files that should not be included "
|
||||
"in the source distribution:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:160
|
||||
msgid "all files in the Distutils \"build\" tree (default :file:`build/`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:162
|
||||
msgid ""
|
||||
"all files in directories named :file:`RCS`, :file:`CVS`, :file:`.svn`, :file:"
|
||||
"`.hg`, :file:`.git`, :file:`.bzr` or :file:`_darcs`"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:165
|
||||
msgid ""
|
||||
"Now we have our complete list of files, which is written to the manifest for "
|
||||
"future reference, and then used to build the source distribution archive(s)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:168
|
||||
msgid ""
|
||||
"You can disable the default set of included files with the :option:`--no-"
|
||||
"defaults` option, and you can disable the standard exclude set with :option:"
|
||||
"`--no-prune`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:172
|
||||
msgid ""
|
||||
"Following the Distutils' own manifest template, let's trace how the :command:"
|
||||
"`sdist` command builds the list of files to include in the Distutils source "
|
||||
"distribution:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:176
|
||||
msgid ""
|
||||
"include all Python source files in the :file:`distutils` and :file:"
|
||||
"`distutils/command` subdirectories (because packages corresponding to those "
|
||||
"two directories were mentioned in the ``packages`` option in the setup "
|
||||
"script---see section :ref:`setup-script`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:181
|
||||
msgid ""
|
||||
"include :file:`README.txt`, :file:`setup.py`, and :file:`setup.cfg` "
|
||||
"(standard files)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:184
|
||||
msgid "include :file:`test/test\\*.py` (standard files)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:186
|
||||
msgid ""
|
||||
"include :file:`\\*.txt` in the distribution root (this will find :file:"
|
||||
"`README.txt` a second time, but such redundancies are weeded out later)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:189
|
||||
msgid ""
|
||||
"include anything matching :file:`\\*.txt` or :file:`\\*.py` in the sub-tree "
|
||||
"under :file:`examples`,"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:192
|
||||
msgid ""
|
||||
"exclude all files in the sub-trees starting at directories matching :file:"
|
||||
"`examples/sample?/build`\\ ---this may exclude files included by the "
|
||||
"previous two steps, so it's important that the ``prune`` command in the "
|
||||
"manifest template comes after the ``recursive-include`` command"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:197
|
||||
msgid ""
|
||||
"exclude the entire :file:`build` tree, and any :file:`RCS`, :file:`CVS`, :"
|
||||
"file:`.svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` and :file:`_darcs` "
|
||||
"directories"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:201
|
||||
msgid ""
|
||||
"Just like in the setup script, file and directory names in the manifest "
|
||||
"template should always be slash-separated; the Distutils will take care of "
|
||||
"converting them to the standard representation on your platform. That way, "
|
||||
"the manifest template is portable across operating systems."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:210
|
||||
msgid "Manifest-related options"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:212
|
||||
msgid ""
|
||||
"The normal course of operations for the :command:`sdist` command is as "
|
||||
"follows:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:214
|
||||
msgid ""
|
||||
"if the manifest file (:file:`MANIFEST` by default) exists and the first line "
|
||||
"does not have a comment indicating it is generated from :file:`MANIFEST.in`, "
|
||||
"then it is used as is, unaltered"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:218
|
||||
msgid ""
|
||||
"if the manifest file doesn't exist or has been previously automatically "
|
||||
"generated, read :file:`MANIFEST.in` and create the manifest"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:221
|
||||
msgid ""
|
||||
"if neither :file:`MANIFEST` nor :file:`MANIFEST.in` exist, create a manifest "
|
||||
"with just the default file set"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:224
|
||||
msgid ""
|
||||
"use the list of files now in :file:`MANIFEST` (either just generated or read "
|
||||
"in) to create the source distribution archive(s)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:227
|
||||
msgid ""
|
||||
"There are a couple of options that modify this behaviour. First, use the :"
|
||||
"option:`--no-defaults` and :option:`--no-prune` to disable the standard "
|
||||
"\"include\" and \"exclude\" sets."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:231
|
||||
msgid ""
|
||||
"Second, you might just want to (re)generate the manifest, but not create a "
|
||||
"source distribution::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/sourcedist.rst:236
|
||||
msgid ":option:`-o` is a shortcut for :option:`--manifest-only`."
|
||||
msgstr ""
|
|
@ -0,0 +1,26 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/distutils/uploading.rst:5
|
||||
msgid "Uploading Packages to the Package Index"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/distutils/uploading.rst:7
|
||||
msgid ""
|
||||
"The contents of this page have moved to the section :ref:`package-index`."
|
||||
msgstr ""
|
3753
extending.po
3753
extending.po
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,222 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/extending/building.rst:7
|
||||
msgid "Building C and C++ Extensions"
|
||||
msgstr "Construire des extensions C et C++"
|
||||
|
||||
#: ../Doc/extending/building.rst:9
|
||||
msgid ""
|
||||
"A C extension for CPython is a shared library (e.g. a ``.so`` file on Linux, "
|
||||
"``.pyd`` on Windows), which exports an *initialization function*."
|
||||
msgstr ""
|
||||
"Une extension C pour CPython est une bibliothèque partagée (Un ``.so`` sur "
|
||||
"Linux, un ``.pyd`` sur windows), qui expose une *fonction d'initialisation*."
|
||||
|
||||
#: ../Doc/extending/building.rst:12
|
||||
msgid ""
|
||||
"To be importable, the shared library must be available on :envvar:"
|
||||
"`PYTHONPATH`, and must be named after the module name, with an appropriate "
|
||||
"extension. When using distutils, the correct filename is generated "
|
||||
"automatically."
|
||||
msgstr ""
|
||||
"Pour pouvoir être importée, la bibliothèque partagée doit pourvoir être "
|
||||
"trouvée dans :envvar:`PYTHONPATH`, et doit porter le nom du module, avec "
|
||||
"l'extension appropriée. En utilisant distutils, le nom est généré "
|
||||
"automatiquement."
|
||||
|
||||
#: ../Doc/extending/building.rst:16
|
||||
msgid "The initialization function has the signature:"
|
||||
msgstr "La fonction d'initialisation doit avoir le prototype :"
|
||||
|
||||
#: ../Doc/extending/building.rst:20
|
||||
msgid ""
|
||||
"It returns either a fully-initialized module, or a :c:type:`PyModuleDef` "
|
||||
"instance. See :ref:`initializing-modules` for details."
|
||||
msgstr ""
|
||||
"Elle doit donner soit un module entièrement initialisé, soit une instance "
|
||||
"de :c:type:`PyModuleDef`. Voir :ref:`initializing-modules` pour plus de "
|
||||
"détails."
|
||||
|
||||
#: ../Doc/extending/building.rst:25
|
||||
msgid ""
|
||||
"For modules with ASCII-only names, the function must be named "
|
||||
"``PyInit_<modulename>``, with ``<modulename>`` replaced by the name of the "
|
||||
"module. When using :ref:`multi-phase-initialization`, non-ASCII module names "
|
||||
"are allowed. In this case, the initialization function name is "
|
||||
"``PyInitU_<modulename>``, with ``<modulename>`` encoded using Python's "
|
||||
"*punycode* encoding with hyphens replaced by underscores. In Python::"
|
||||
msgstr ""
|
||||
"Pour les modules dont les noms sont entièrement en ASCII, la fonction doit "
|
||||
"être nommée ``PyInit_<modulename>``, dont ``<modulename>`` est remplacé par "
|
||||
"le nom du module. En utilisant :ref:`multi-phase-initialization`, il est "
|
||||
"possible d'utiliser des noms de modules comptant des caractères non-ASCII. "
|
||||
"Dans ce cas, le nom de la fonction d'initialisation est "
|
||||
"``PyInitU_<modulename>``, où ``modulename`` est encodé avec l'encodage "
|
||||
"*punyencode* de Python, dont les tirets sont remplacés par des tirets-bas. "
|
||||
"En Python ça donne : ::"
|
||||
|
||||
#: ../Doc/extending/building.rst:39
|
||||
msgid ""
|
||||
"It is possible to export multiple modules from a single shared library by "
|
||||
"defining multiple initialization functions. However, importing them requires "
|
||||
"using symbolic links or a custom importer, because by default only the "
|
||||
"function corresponding to the filename is found. See the *\"Multiple modules "
|
||||
"in one library\"* section in :pep:`489` for details."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/building.rst:49
|
||||
msgid "Building C and C++ Extensions with distutils"
|
||||
msgstr "Construire les extensions C et C++ avec distutils"
|
||||
|
||||
#: ../Doc/extending/building.rst:53
|
||||
msgid ""
|
||||
"Extension modules can be built using distutils, which is included in "
|
||||
"Python. Since distutils also supports creation of binary packages, users "
|
||||
"don't necessarily need a compiler and distutils to install the extension."
|
||||
msgstr ""
|
||||
"Des modules d'extension peuvent être construits avec distutils, qui est "
|
||||
"inclus dans Python. Puisque distutils gère aussi la création de paquets "
|
||||
"binaires, les utilisateurs n'auront pas nécessairement besoin ni d'un "
|
||||
"compilateur ni de distutils pour installer l'extension."
|
||||
|
||||
#: ../Doc/extending/building.rst:57
|
||||
msgid ""
|
||||
"A distutils package contains a driver script, :file:`setup.py`. This is a "
|
||||
"plain Python file, which, in the most simple case, could look like this:"
|
||||
msgstr ""
|
||||
"Un paquet distutils contient un script :file:`setup.py`. C'est un simple "
|
||||
"fichier Python, ressemblant dans la plupart des cas à :"
|
||||
|
||||
#: ../Doc/extending/building.rst:73
|
||||
msgid "With this :file:`setup.py`, and a file :file:`demo.c`, running ::"
|
||||
msgstr "Avec ce :file:`setup.py` et un fichier :file:`demo.c`, lancer : ::"
|
||||
|
||||
#: ../Doc/extending/building.rst:77
|
||||
msgid ""
|
||||
"will compile :file:`demo.c`, and produce an extension module named ``demo`` "
|
||||
"in the :file:`build` directory. Depending on the system, the module file "
|
||||
"will end up in a subdirectory :file:`build/lib.system`, and may have a name "
|
||||
"like :file:`demo.so` or :file:`demo.pyd`."
|
||||
msgstr ""
|
||||
"compilera :file:`demo.c`, et produira un module d'extension nommé ``demo`` "
|
||||
"dans le dossier :file:`build`. En fonction du système, le fichier du module "
|
||||
"peut se retrouver dans :file:`build/lib.system`, et son nom peut être :file:"
|
||||
"`demo.py` ou :file:`demo.pyd`."
|
||||
|
||||
#: ../Doc/extending/building.rst:82
|
||||
msgid ""
|
||||
"In the :file:`setup.py`, all execution is performed by calling the ``setup`` "
|
||||
"function. This takes a variable number of keyword arguments, of which the "
|
||||
"example above uses only a subset. Specifically, the example specifies meta-"
|
||||
"information to build packages, and it specifies the contents of the "
|
||||
"package. Normally, a package will contain additional modules, like Python "
|
||||
"source modules, documentation, subpackages, etc. Please refer to the "
|
||||
"distutils documentation in :ref:`distutils-index` to learn more about the "
|
||||
"features of distutils; this section explains building extension modules only."
|
||||
msgstr ""
|
||||
"Dans le fichier :file:`setup.py`, tout est exécuté en appelant la fonction "
|
||||
"``setup``. Elle prend un nombre variable d'arguments nommés, dont l'exemple "
|
||||
"précédent n'utilise qu'une partie. L'exemple précise des méta-informations "
|
||||
"pour construire les paquets, et définir le contenu du paquet. Normalement un "
|
||||
"paquet contient des modules additionnels, comme des modules sources, "
|
||||
"documentation, sous paquets, etc. Referez-vous à la documentation de "
|
||||
"distutils dans :ref:`distutils-index` pour en apprendre plus sur les "
|
||||
"fonctionnalités de distutils. Cette section n'explique que la construction "
|
||||
"de modules d'extension."
|
||||
|
||||
#: ../Doc/extending/building.rst:91
|
||||
msgid ""
|
||||
"It is common to pre-compute arguments to :func:`setup`, to better structure "
|
||||
"the driver script. In the example above, the ``ext_modules`` argument to :"
|
||||
"func:`~distutils.core.setup` is a list of extension modules, each of which "
|
||||
"is an instance of the :class:`~distutils.extension.Extension`. In the "
|
||||
"example, the instance defines an extension named ``demo`` which is build by "
|
||||
"compiling a single source file, :file:`demo.c`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/building.rst:99
|
||||
msgid ""
|
||||
"In many cases, building an extension is more complex, since additional "
|
||||
"preprocessor defines and libraries may be needed. This is demonstrated in "
|
||||
"the example below."
|
||||
msgstr ""
|
||||
"Dans la plupart des cas, construire une extension est plus complexe à cause "
|
||||
"des bibliothèques et définitions de préprocesseurs dont la compilation "
|
||||
"pourrait dépendre. C'est ce qu'on remarque dans l'exemple plus bas."
|
||||
|
||||
#: ../Doc/extending/building.rst:127
|
||||
msgid ""
|
||||
"In this example, :func:`~distutils.core.setup` is called with additional "
|
||||
"meta-information, which is recommended when distribution packages have to be "
|
||||
"built. For the extension itself, it specifies preprocessor defines, include "
|
||||
"directories, library directories, and libraries. Depending on the compiler, "
|
||||
"distutils passes this information in different ways to the compiler. For "
|
||||
"example, on Unix, this may result in the compilation commands ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/building.rst:139
|
||||
msgid ""
|
||||
"These lines are for demonstration purposes only; distutils users should "
|
||||
"trust that distutils gets the invocations right."
|
||||
msgstr ""
|
||||
"Ces lignes ne sont qu'à titre d'exemple, les utilisateurs de distutils "
|
||||
"doivent avoir confiance en distutils qui fera les appels correctement."
|
||||
|
||||
#: ../Doc/extending/building.rst:146
|
||||
msgid "Distributing your extension modules"
|
||||
msgstr "Distribuer vos modules d'extension"
|
||||
|
||||
#: ../Doc/extending/building.rst:148
|
||||
msgid ""
|
||||
"When an extension has been successfully build, there are three ways to use "
|
||||
"it."
|
||||
msgstr ""
|
||||
"Lorsqu'une extension a été construite avec succès, il existe trois moyens de "
|
||||
"l'utiliser."
|
||||
|
||||
#: ../Doc/extending/building.rst:150
|
||||
msgid ""
|
||||
"End-users will typically want to install the module, they do so by running ::"
|
||||
msgstr ""
|
||||
"Typiquement, les utilisateurs vont vouloir installer le module, ils le font "
|
||||
"en exécutant : ::"
|
||||
|
||||
#: ../Doc/extending/building.rst:154
|
||||
msgid ""
|
||||
"Module maintainers should produce source packages; to do so, they run ::"
|
||||
msgstr ""
|
||||
"Les mainteneurs de modules voudront produire des paquets source, pour ce "
|
||||
"faire ils exécuteront : ::"
|
||||
|
||||
#: ../Doc/extending/building.rst:158
|
||||
msgid ""
|
||||
"In some cases, additional files need to be included in a source "
|
||||
"distribution; this is done through a :file:`MANIFEST.in` file; see :ref:"
|
||||
"`manifest` for details."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/building.rst:161
|
||||
msgid ""
|
||||
"If the source distribution has been build successfully, maintainers can also "
|
||||
"create binary distributions. Depending on the platform, one of the following "
|
||||
"commands can be used to do so. ::"
|
||||
msgstr ""
|
||||
"Si la distribution source a été construite avec succès, les mainteneurs "
|
||||
"peuvent créer une distribution binaire. En fonction de la plateforme, une "
|
||||
"des commandes suivantes peut être utilisée. ::"
|
|
@ -0,0 +1,450 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:8
|
||||
msgid "Embedding Python in Another Application"
|
||||
msgstr "Intégrer Python dans une autre Application"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:10
|
||||
msgid ""
|
||||
"The previous chapters discussed how to extend Python, that is, how to extend "
|
||||
"the functionality of Python by attaching a library of C functions to it. It "
|
||||
"is also possible to do it the other way around: enrich your C/C++ "
|
||||
"application by embedding Python in it. Embedding provides your application "
|
||||
"with the ability to implement some of the functionality of your application "
|
||||
"in Python rather than C or C++. This can be used for many purposes; one "
|
||||
"example would be to allow users to tailor the application to their needs by "
|
||||
"writing some scripts in Python. You can also use it yourself if some of the "
|
||||
"functionality can be written in Python more easily."
|
||||
msgstr ""
|
||||
"Les chapitres précédents couvraient l'extension de Python, c'est à dire, "
|
||||
"comment enrichir une fonctionnalité de Python en y attachant une "
|
||||
"bibliothèque de fonctions C. C'est aussi possible dans l'autre sens: "
|
||||
"enrichir vos applications C/C++ en y intégrant Python. Intégrer Python vous "
|
||||
"permet d'implémenter certaines fonctionnalités de vos applications en Python "
|
||||
"plutôt qu'en C ou C++. C'est utile dans de nombreux cas, un exemple serait "
|
||||
"de permettre aux utilisateurs d'adapter une application à leur besoins en y "
|
||||
"écrivant des scripts Python. Vous pouvez aussi l'utiliser vous même si "
|
||||
"certaines fonctionnalités peuvent être rédigées plus facilement en Python."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:20
|
||||
msgid ""
|
||||
"Embedding Python is similar to extending it, but not quite. The difference "
|
||||
"is that when you extend Python, the main program of the application is still "
|
||||
"the Python interpreter, while if you embed Python, the main program may have "
|
||||
"nothing to do with Python --- instead, some parts of the application "
|
||||
"occasionally call the Python interpreter to run some Python code."
|
||||
msgstr ""
|
||||
"Intégrer et étendre Python sont des tâches presque identiques. La différence "
|
||||
"est qu'en étendant Python, le programme principal reste l'interpréteur "
|
||||
"Python, alors qu'en intégrant Python le programme principal peut ne rien à "
|
||||
"voir avec Python. C'est simplement quelques parties du programme qui "
|
||||
"appellent l'interprète Python pour exécuter un peu de code Python."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:26
|
||||
msgid ""
|
||||
"So if you are embedding Python, you are providing your own main program. "
|
||||
"One of the things this main program has to do is initialize the Python "
|
||||
"interpreter. At the very least, you have to call the function :c:func:"
|
||||
"`Py_Initialize`. There are optional calls to pass command line arguments to "
|
||||
"Python. Then later you can call the interpreter from any part of the "
|
||||
"application."
|
||||
msgstr ""
|
||||
"En intégrant Python, vous fournissez le programme principal. L'une de ses "
|
||||
"tâches sera d'initialiser l'interpréteur. Au minimum vous devrez appeler :c:"
|
||||
"func:`Py_Initialize`. Il est possible, avec quelques appels supplémentaires, "
|
||||
"de passer des options à Python. Ensuite vous pourrez appeler l'interpréteur "
|
||||
"depuis n'importe quelle partie de votre programme."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:32
|
||||
msgid ""
|
||||
"There are several different ways to call the interpreter: you can pass a "
|
||||
"string containing Python statements to :c:func:`PyRun_SimpleString`, or you "
|
||||
"can pass a stdio file pointer and a file name (for identification in error "
|
||||
"messages only) to :c:func:`PyRun_SimpleFile`. You can also call the lower-"
|
||||
"level operations described in the previous chapters to construct and use "
|
||||
"Python objects."
|
||||
msgstr ""
|
||||
"Il existe différents moyens d'appeler l'interpréteur: vous pouvez donner une "
|
||||
"chaîne contenant des instructions Python à :c:func:`PyRun_SimpleString`, ou "
|
||||
"vous pouvez donner un pointeur de fichier *stdio* et un nom de fichier "
|
||||
"(juste pour nommer les messages d'erreur) à :c:func:`PyRunSimpleFile`. Vous "
|
||||
"pouvez aussi appeler les API de bas niveau décrites dans les chapitres "
|
||||
"précédents pour construire et utiliser des objets Python."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:42
|
||||
msgid ":ref:`c-api-index`"
|
||||
msgstr ":ref:`c-api-index`"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:42
|
||||
msgid ""
|
||||
"The details of Python's C interface are given in this manual. A great deal "
|
||||
"of necessary information can be found here."
|
||||
msgstr ""
|
||||
"Les détails sur l'interface entre Python et le C sont donnés dans ce manuel. "
|
||||
"Pléthore informations s'y trouvent."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:49
|
||||
msgid "Very High Level Embedding"
|
||||
msgstr "Intégration de Très Haut Niveau"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:51
|
||||
msgid ""
|
||||
"The simplest form of embedding Python is the use of the very high level "
|
||||
"interface. This interface is intended to execute a Python script without "
|
||||
"needing to interact with the application directly. This can for example be "
|
||||
"used to perform some operation on a file. ::"
|
||||
msgstr ""
|
||||
"La manière la plus simple d'intégrer Python est d'utiliser une interface de "
|
||||
"très haut niveau. Cette interface a pour but d'exécuter un script Python "
|
||||
"sans avoir à interagir avec directement. C'est utile, par exemple, pour "
|
||||
"effectuer une opération sur un fichier. ::"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:77
|
||||
msgid ""
|
||||
"The :c:func:`Py_SetProgramName` function should be called before :c:func:"
|
||||
"`Py_Initialize` to inform the interpreter about paths to Python run-time "
|
||||
"libraries. Next, the Python interpreter is initialized with :c:func:"
|
||||
"`Py_Initialize`, followed by the execution of a hard-coded Python script "
|
||||
"that prints the date and time. Afterwards, the :c:func:`Py_FinalizeEx` call "
|
||||
"shuts the interpreter down, followed by the end of the program. In a real "
|
||||
"program, you may want to get the Python script from another source, perhaps "
|
||||
"a text-editor routine, a file, or a database. Getting the Python code from "
|
||||
"a file can better be done by using the :c:func:`PyRun_SimpleFile` function, "
|
||||
"which saves you the trouble of allocating memory space and loading the file "
|
||||
"contents."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/embedding.rst:92
|
||||
msgid "Beyond Very High Level Embedding: An overview"
|
||||
msgstr "Au delà de l'Intégration de Haut Niveau: Survol"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:94
|
||||
msgid ""
|
||||
"The high level interface gives you the ability to execute arbitrary pieces "
|
||||
"of Python code from your application, but exchanging data values is quite "
|
||||
"cumbersome to say the least. If you want that, you should use lower level "
|
||||
"calls. At the cost of having to write more C code, you can achieve almost "
|
||||
"anything."
|
||||
msgstr ""
|
||||
"L'interface de haut niveau vous permet d'exécuter n'importe quel morceau de "
|
||||
"code Python depuis votre application, mais échanger des données est quelque "
|
||||
"peu alambiqué. Si c'est ce dont vous avez besoin, vous devez utiliser des "
|
||||
"appels de niveau plus bas. Il vous en coûtera plus de lignes de C à écrire, "
|
||||
"mais vous pourrez presque tout faire."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:99
|
||||
msgid ""
|
||||
"It should be noted that extending Python and embedding Python is quite the "
|
||||
"same activity, despite the different intent. Most topics discussed in the "
|
||||
"previous chapters are still valid. To show this, consider what the extension "
|
||||
"code from Python to C really does:"
|
||||
msgstr ""
|
||||
"Il est à souligner qu'étendre ou intégrer Python revient à la louche au "
|
||||
"même, en dépit de la différence d'intention. La plupart des sujets parcourus "
|
||||
"dans les chapitres précédents sont toujours valides. Pour le prouver, "
|
||||
"regardez ce qu'un code d'extension de Python vers C fait réellement :"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:104
|
||||
msgid "Convert data values from Python to C,"
|
||||
msgstr "Convertir des valeurs de Python vers le C,"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:106
|
||||
msgid "Perform a function call to a C routine using the converted values, and"
|
||||
msgstr "Appeler une fonction C en utilisant les valeurs converties, et"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:108
|
||||
msgid "Convert the data values from the call from C to Python."
|
||||
msgstr "Convertir les résultats de l'appel à la fonction C pour Python."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:110
|
||||
msgid "When embedding Python, the interface code does:"
|
||||
msgstr "Lors de l'intégration de Python, le code de l'interface fait :"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:112
|
||||
msgid "Convert data values from C to Python,"
|
||||
msgstr "Convertir les valeurs depuis le C vers Python,"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:114
|
||||
msgid ""
|
||||
"Perform a function call to a Python interface routine using the converted "
|
||||
"values, and"
|
||||
msgstr ""
|
||||
"Effectuer un appel de fonction de l'interface Python en utilisant les "
|
||||
"valeurs converties, et"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:117
|
||||
msgid "Convert the data values from the call from Python to C."
|
||||
msgstr "Convertir les valeurs de l'appel Python pour le C."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:119
|
||||
msgid ""
|
||||
"As you can see, the data conversion steps are simply swapped to accommodate "
|
||||
"the different direction of the cross-language transfer. The only difference "
|
||||
"is the routine that you call between both data conversions. When extending, "
|
||||
"you call a C routine, when embedding, you call a Python routine."
|
||||
msgstr ""
|
||||
"Tel que vous le voyez, les conversions sont simplement inversées pour "
|
||||
"s'adapter au différentes directions de transfert inter-langage. La seule "
|
||||
"différence est la fonction que vous appelez entre les deux conversions de "
|
||||
"données. Lors de l'extension, vous appelez une fonction C, lors de "
|
||||
"l'intégration vous appelez une fonction Python."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:124
|
||||
msgid ""
|
||||
"This chapter will not discuss how to convert data from Python to C and vice "
|
||||
"versa. Also, proper use of references and dealing with errors is assumed to "
|
||||
"be understood. Since these aspects do not differ from extending the "
|
||||
"interpreter, you can refer to earlier chapters for the required information."
|
||||
msgstr ""
|
||||
"Ce chapitre ne couvrira pas la conversion des données de Python vers le C ni "
|
||||
"l'inverse. Aussi, un usage correct des références, ainsi que savoir gérer "
|
||||
"les erreurs sont considérés acquis. Ces aspects étant identiques à "
|
||||
"l'extension de l'interpréteur, vous pouvez vous référer aux chapitres "
|
||||
"précédents."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:133
|
||||
msgid "Pure Embedding"
|
||||
msgstr "Intégration Pure"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:135
|
||||
msgid ""
|
||||
"The first program aims to execute a function in a Python script. Like in the "
|
||||
"section about the very high level interface, the Python interpreter does not "
|
||||
"directly interact with the application (but that will change in the next "
|
||||
"section)."
|
||||
msgstr ""
|
||||
"L'objectif du premier programme est d'exécuter une fonction dans un script "
|
||||
"Python. Comme dans la section à propos des interfaces de haut niveau, "
|
||||
"l'interpréteur n'interagit pas directement avec l'application (mais le fera "
|
||||
"dans la section suivante)."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:140
|
||||
msgid "The code to run a function defined in a Python script is:"
|
||||
msgstr "Le code pour appeler une fonction définie dans un script Python est :"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:145
|
||||
msgid ""
|
||||
"This code loads a Python script using ``argv[1]``, and calls the function "
|
||||
"named in ``argv[2]``. Its integer arguments are the other values of the "
|
||||
"``argv`` array. If you :ref:`compile and link <compiling>` this program "
|
||||
"(let's call the finished executable :program:`call`), and use it to execute "
|
||||
"a Python script, such as:"
|
||||
msgstr ""
|
||||
"Ce code charge un script Python en utilisant ``argv[1]``, et appelle une "
|
||||
"fonction dont le nom est dans ``argv[2]``. Ses arguments entiers sont les "
|
||||
"autres valeurs de ``argv``. Si vous :ref:`compilez et liez <compiling>` ce "
|
||||
"programme (appelons l'exécutable :program:`call`), et l'appellez pour "
|
||||
"exécuter un script Python, tel que :"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:160
|
||||
msgid "then the result should be:"
|
||||
msgstr "alors, le résultat sera:"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:168
|
||||
msgid ""
|
||||
"Although the program is quite large for its functionality, most of the code "
|
||||
"is for data conversion between Python and C, and for error reporting. The "
|
||||
"interesting part with respect to embedding Python starts with ::"
|
||||
msgstr ""
|
||||
"Bien que le programme soit plutôt gros pour ses fonctionnalités, la plupart "
|
||||
"du code n'est que conversion de données entre Python et C, aussi que pour "
|
||||
"rapporter les erreurs. La partie intéressante, qui concerne l'intégration de "
|
||||
"Python débute par : ::"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:177
|
||||
msgid ""
|
||||
"After initializing the interpreter, the script is loaded using :c:func:"
|
||||
"`PyImport_Import`. This routine needs a Python string as its argument, "
|
||||
"which is constructed using the :c:func:`PyUnicode_FromString` data "
|
||||
"conversion routine. ::"
|
||||
msgstr ""
|
||||
"Après avoir initialisé l'interpréteur, le script est chargé en utilisant :c:"
|
||||
"func:`PyImport_Import`. Cette fonction prend une chaîne Python pour "
|
||||
"argument, elle même construite en utilisant la fonction de conversion :c:"
|
||||
"func:`PyUnicode_FromString`."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:190
|
||||
msgid ""
|
||||
"Once the script is loaded, the name we're looking for is retrieved using :c:"
|
||||
"func:`PyObject_GetAttrString`. If the name exists, and the object returned "
|
||||
"is callable, you can safely assume that it is a function. The program then "
|
||||
"proceeds by constructing a tuple of arguments as normal. The call to the "
|
||||
"Python function is then made with::"
|
||||
msgstr ""
|
||||
"Une fois le script chargé, le nom recherché est obtenu en utilisant :c:func:"
|
||||
"`PyObject_GetAttrString`. Si le nom existe, et que l'objet récupéré peut "
|
||||
"être appelé, vous pouvez présumer sans risque que c'est une fonction. Le "
|
||||
"programme continue, classiquement, par la construction de l'uplet "
|
||||
"d'arguments. L'appel à la fonction Python est alors effectué avec : ::"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:198
|
||||
msgid ""
|
||||
"Upon return of the function, ``pValue`` is either *NULL* or it contains a "
|
||||
"reference to the return value of the function. Be sure to release the "
|
||||
"reference after examining the value."
|
||||
msgstr ""
|
||||
"Après l'exécution de la fonction, ``pValue`` est soit *NULL*, soit une "
|
||||
"référence sur la valeur donnée par la fonction. Assurez-vous de libérer la "
|
||||
"référence après avoir utilisé la valeur."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:206
|
||||
msgid "Extending Embedded Python"
|
||||
msgstr "Étendre un Python Intégré"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:208
|
||||
msgid ""
|
||||
"Until now, the embedded Python interpreter had no access to functionality "
|
||||
"from the application itself. The Python API allows this by extending the "
|
||||
"embedded interpreter. That is, the embedded interpreter gets extended with "
|
||||
"routines provided by the application. While it sounds complex, it is not so "
|
||||
"bad. Simply forget for a while that the application starts the Python "
|
||||
"interpreter. Instead, consider the application to be a set of subroutines, "
|
||||
"and write some glue code that gives Python access to those routines, just "
|
||||
"like you would write a normal Python extension. For example::"
|
||||
msgstr ""
|
||||
"Jusqu'à présent, l'interpréteur Python intégré n'avait pas accès aux "
|
||||
"fonctionnalités de l'application elle-même. L'API Python le permet en "
|
||||
"étendant l'interpréteur intégré. Autrement dit, l'interpréteur intégré est "
|
||||
"étendu avec des fonctions fournies par l'application. Bien que cela puisse "
|
||||
"sembler complexe, ce n'est pas si dur. Il suffit d'oublier que l'application "
|
||||
"démarre l'interpréteur Python, au lieu de cela, voyez l'application comme un "
|
||||
"ensemble de fonctions, et rédigez un peu de code pour exposer ces fonctions "
|
||||
"à Python, tout comme vous écririez une extension Python normale. Par "
|
||||
"exemple : ::"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:245
|
||||
msgid ""
|
||||
"Insert the above code just above the :c:func:`main` function. Also, insert "
|
||||
"the following two statements before the call to :c:func:`Py_Initialize`::"
|
||||
msgstr ""
|
||||
"Insérez le code ci-dessus juste avant la fonction :c:func:`main`. Ajoutez "
|
||||
"aussi les deux instructions suivantes avant l'appel à :c:func:"
|
||||
"`Py_Initialize` ::"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:251
|
||||
msgid ""
|
||||
"These two lines initialize the ``numargs`` variable, and make the :func:`emb."
|
||||
"numargs` function accessible to the embedded Python interpreter. With these "
|
||||
"extensions, the Python script can do things like"
|
||||
msgstr ""
|
||||
"Ces deux lignes initialisent la variable ``numarg``, et rend la fonction :"
|
||||
"func:`emb.numargs` accessible à l'interprète intégré. Avec ces ajouts, le "
|
||||
"script Python petit maintenant faire des choses comme"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:260
|
||||
msgid ""
|
||||
"In a real application, the methods will expose an API of the application to "
|
||||
"Python."
|
||||
msgstr ""
|
||||
"Dans un cas réel, les méthodes exposeraient une API de l'application a "
|
||||
"Python."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:270
|
||||
msgid "Embedding Python in C++"
|
||||
msgstr "Intégrer Python dans du C++"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:272
|
||||
msgid ""
|
||||
"It is also possible to embed Python in a C++ program; precisely how this is "
|
||||
"done will depend on the details of the C++ system used; in general you will "
|
||||
"need to write the main program in C++, and use the C++ compiler to compile "
|
||||
"and link your program. There is no need to recompile Python itself using C+"
|
||||
"+."
|
||||
msgstr ""
|
||||
"Il est aussi possible d'intégrer Python dans un programme en C++, la manière "
|
||||
"exacte dont cela se fait dépend de détails du système C++ utilisé. En "
|
||||
"général vous écrirez le programme principal en C++, utiliserez un "
|
||||
"compilateur C++ pour compiler et lier votre programme. Il n'y a pas besoin "
|
||||
"de recompiler Python en utilisant C++."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:281
|
||||
msgid "Compiling and Linking under Unix-like systems"
|
||||
msgstr "Compiler et Lier en environnement Unix ou similaire"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:283
|
||||
msgid ""
|
||||
"It is not necessarily trivial to find the right flags to pass to your "
|
||||
"compiler (and linker) in order to embed the Python interpreter into your "
|
||||
"application, particularly because Python needs to load library modules "
|
||||
"implemented as C dynamic extensions (:file:`.so` files) linked against it."
|
||||
msgstr ""
|
||||
"Ce n'est pas évident de trouver les bonnes options à passer au compilateur "
|
||||
"(et *linker*) pour intégrer l'interpréteur Python dans une application, "
|
||||
"Python ayant besoin de charger des extensions sous forme de bibliothèques "
|
||||
"dynamiques en C (des :file:`.so`) pour se lier avec."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:289
|
||||
msgid ""
|
||||
"To find out the required compiler and linker flags, you can execute the :"
|
||||
"file:`python{X.Y}-config` script which is generated as part of the "
|
||||
"installation process (a :file:`python3-config` script may also be "
|
||||
"available). This script has several options, of which the following will be "
|
||||
"directly useful to you:"
|
||||
msgstr ""
|
||||
"Pour trouver les bonnes option de compilateur et *linker*, vous pouvez "
|
||||
"exécuter le script :file:`python(X.Y)-config` généré durant l'installation "
|
||||
"(un script :file:`python3-config` peut aussi être disponible). Ce script a "
|
||||
"quelques options, celles-ci vous seront utiles :"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:295
|
||||
msgid ""
|
||||
"``pythonX.Y-config --cflags`` will give you the recommended flags when "
|
||||
"compiling:"
|
||||
msgstr ""
|
||||
"``pythonX.Y-config --cflags`` vous donnera les options recommandées pour "
|
||||
"compiler:"
|
||||
|
||||
#: ../Doc/extending/embedding.rst:303
|
||||
msgid ""
|
||||
"``pythonX.Y-config --ldflags`` will give you the recommended flags when "
|
||||
"linking:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/embedding.rst:312
|
||||
msgid ""
|
||||
"To avoid confusion between several Python installations (and especially "
|
||||
"between the system Python and your own compiled Python), it is recommended "
|
||||
"that you use the absolute path to :file:`python{X.Y}-config`, as in the "
|
||||
"above example."
|
||||
msgstr ""
|
||||
"Pour éviter la confusion entre différentes installations de Python, (et plus "
|
||||
"spécialement entre celle de votre système et votre version compilée), il est "
|
||||
"recommandé d'utiliser un chemin absolu vers :file:`python{X.Y}-config`, "
|
||||
"comme dans l'exemple précédent."
|
||||
|
||||
#: ../Doc/extending/embedding.rst:317
|
||||
msgid ""
|
||||
"If this procedure doesn't work for you (it is not guaranteed to work for all "
|
||||
"Unix-like platforms; however, we welcome :ref:`bug reports <reporting-"
|
||||
"bugs>`) you will have to read your system's documentation about dynamic "
|
||||
"linking and/or examine Python's :file:`Makefile` (use :func:`sysconfig."
|
||||
"get_makefile_filename` to find its location) and compilation options. In "
|
||||
"this case, the :mod:`sysconfig` module is a useful tool to programmatically "
|
||||
"extract the configuration values that you will want to combine together. "
|
||||
"For example:"
|
||||
msgstr ""
|
||||
"Si cette procédure ne fonctionne pas pour vous (il n'est pas garanti qu'elle "
|
||||
"fonctionne pour toutes les plateformes Unix, mais nous traiteront volontiers "
|
||||
"les :ref:`rapports de bugs <reporting-bugs>`), vous devrez lire "
|
||||
"ladocumentation de votre système sur la liaison dynamique (*dynamic "
|
||||
"linking*) et / ouexaminer le :file:`Makefile` de Python (utilisez :func:"
|
||||
"`sysconfig.get_makefile_filename` pour trouver son emplacement) et les "
|
||||
"options de compilation. Dans ce cas, le module :mod:`sysconfig` est un outil "
|
||||
"utile pour extraire automatiquement les valeurs de configuration que vous "
|
||||
"voudrez combiner ensemble. Par example :"
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,98 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/extending/index.rst:5
|
||||
msgid "Extending and Embedding the Python Interpreter"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/index.rst:7
|
||||
msgid ""
|
||||
"This document describes how to write modules in C or C++ to extend the "
|
||||
"Python interpreter with new modules. Those modules can not only define new "
|
||||
"functions but also new object types and their methods. The document also "
|
||||
"describes how to embed the Python interpreter in another application, for "
|
||||
"use as an extension language. Finally, it shows how to compile and link "
|
||||
"extension modules so that they can be loaded dynamically (at run time) into "
|
||||
"the interpreter, if the underlying operating system supports this feature."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/index.rst:15
|
||||
msgid ""
|
||||
"This document assumes basic knowledge about Python. For an informal "
|
||||
"introduction to the language, see :ref:`tutorial-index`. :ref:`reference-"
|
||||
"index` gives a more formal definition of the language. :ref:`library-index` "
|
||||
"documents the existing object types, functions and modules (both built-in "
|
||||
"and written in Python) that give the language its wide application range."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/index.rst:21
|
||||
msgid ""
|
||||
"For a detailed description of the whole Python/C API, see the separate :ref:"
|
||||
"`c-api-index`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/index.rst:26
|
||||
msgid "Recommended third party tools"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/index.rst:28
|
||||
msgid ""
|
||||
"This guide only covers the basic tools for creating extensions provided as "
|
||||
"part of this version of CPython. Third party tools like Cython, ``cffi``, "
|
||||
"SWIG and Numba offer both simpler and more sophisticated approaches to "
|
||||
"creating C and C++ extensions for Python."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/index.rst:38
|
||||
msgid ""
|
||||
"`Python Packaging User Guide: Binary Extensions <https://packaging.python."
|
||||
"org/en/latest/extensions/>`_"
|
||||
msgstr ""
|
||||
"`Python Packaging User Guide: Binary Extensions <https://packaging.python."
|
||||
"org/en/latest/extensions/>`_"
|
||||
|
||||
#: ../Doc/extending/index.rst:36
|
||||
msgid ""
|
||||
"The Python Packaging User Guide not only covers several available tools that "
|
||||
"simplify the creation of binary extensions, but also discusses the various "
|
||||
"reasons why creating an extension module may be desirable in the first place."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/index.rst:43
|
||||
msgid "Creating extensions without third party tools"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/index.rst:45
|
||||
msgid ""
|
||||
"This section of the guide covers creating C and C++ extensions without "
|
||||
"assistance from third party tools. It is intended primarily for creators of "
|
||||
"those tools, rather than being a recommended way to create your own C "
|
||||
"extensions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/index.rst:60
|
||||
msgid "Embedding the CPython runtime in a larger application"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/index.rst:62
|
||||
msgid ""
|
||||
"Sometimes, rather than creating an extension that runs inside the Python "
|
||||
"interpreter as the main application, it is desirable to instead embed the "
|
||||
"CPython runtime inside a larger application. This section covers some of the "
|
||||
"details involved in doing that successfully."
|
||||
msgstr ""
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,188 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/extending/windows.rst:8
|
||||
msgid "Building C and C++ Extensions on Windows"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:10
|
||||
msgid ""
|
||||
"This chapter briefly explains how to create a Windows extension module for "
|
||||
"Python using Microsoft Visual C++, and follows with more detailed background "
|
||||
"information on how it works. The explanatory material is useful for both "
|
||||
"the Windows programmer learning to build Python extensions and the Unix "
|
||||
"programmer interested in producing software which can be successfully built "
|
||||
"on both Unix and Windows."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:17
|
||||
msgid ""
|
||||
"Module authors are encouraged to use the distutils approach for building "
|
||||
"extension modules, instead of the one described in this section. You will "
|
||||
"still need the C compiler that was used to build Python; typically Microsoft "
|
||||
"Visual C++."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:24
|
||||
msgid ""
|
||||
"This chapter mentions a number of filenames that include an encoded Python "
|
||||
"version number. These filenames are represented with the version number "
|
||||
"shown as ``XY``; in practice, ``'X'`` will be the major version number and "
|
||||
"``'Y'`` will be the minor version number of the Python release you're "
|
||||
"working with. For example, if you are using Python 2.2.1, ``XY`` will "
|
||||
"actually be ``22``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:34
|
||||
msgid "A Cookbook Approach"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:36
|
||||
msgid ""
|
||||
"There are two approaches to building extension modules on Windows, just as "
|
||||
"there are on Unix: use the :mod:`distutils` package to control the build "
|
||||
"process, or do things manually. The distutils approach works well for most "
|
||||
"extensions; documentation on using :mod:`distutils` to build and package "
|
||||
"extension modules is available in :ref:`distutils-index`. If you find you "
|
||||
"really need to do things manually, it may be instructive to study the "
|
||||
"project file for the :source:`winsound <PCbuild/winsound.vcxproj>` standard "
|
||||
"library module."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:48
|
||||
msgid "Differences Between Unix and Windows"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:53
|
||||
msgid ""
|
||||
"Unix and Windows use completely different paradigms for run-time loading of "
|
||||
"code. Before you try to build a module that can be dynamically loaded, be "
|
||||
"aware of how your system works."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:57
|
||||
msgid ""
|
||||
"In Unix, a shared object (:file:`.so`) file contains code to be used by the "
|
||||
"program, and also the names of functions and data that it expects to find in "
|
||||
"the program. When the file is joined to the program, all references to "
|
||||
"those functions and data in the file's code are changed to point to the "
|
||||
"actual locations in the program where the functions and data are placed in "
|
||||
"memory. This is basically a link operation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:64
|
||||
msgid ""
|
||||
"In Windows, a dynamic-link library (:file:`.dll`) file has no dangling "
|
||||
"references. Instead, an access to functions or data goes through a lookup "
|
||||
"table. So the DLL code does not have to be fixed up at runtime to refer to "
|
||||
"the program's memory; instead, the code already uses the DLL's lookup table, "
|
||||
"and the lookup table is modified at runtime to point to the functions and "
|
||||
"data."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:70
|
||||
msgid ""
|
||||
"In Unix, there is only one type of library file (:file:`.a`) which contains "
|
||||
"code from several object files (:file:`.o`). During the link step to create "
|
||||
"a shared object file (:file:`.so`), the linker may find that it doesn't know "
|
||||
"where an identifier is defined. The linker will look for it in the object "
|
||||
"files in the libraries; if it finds it, it will include all the code from "
|
||||
"that object file."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:76
|
||||
msgid ""
|
||||
"In Windows, there are two types of library, a static library and an import "
|
||||
"library (both called :file:`.lib`). A static library is like a Unix :file:`."
|
||||
"a` file; it contains code to be included as necessary. An import library is "
|
||||
"basically used only to reassure the linker that a certain identifier is "
|
||||
"legal, and will be present in the program when the DLL is loaded. So the "
|
||||
"linker uses the information from the import library to build the lookup "
|
||||
"table for using identifiers that are not included in the DLL. When an "
|
||||
"application or a DLL is linked, an import library may be generated, which "
|
||||
"will need to be used for all future DLLs that depend on the symbols in the "
|
||||
"application or DLL."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:86
|
||||
msgid ""
|
||||
"Suppose you are building two dynamic-load modules, B and C, which should "
|
||||
"share another block of code A. On Unix, you would *not* pass :file:`A.a` to "
|
||||
"the linker for :file:`B.so` and :file:`C.so`; that would cause it to be "
|
||||
"included twice, so that B and C would each have their own copy. In Windows, "
|
||||
"building :file:`A.dll` will also build :file:`A.lib`. You *do* pass :file:"
|
||||
"`A.lib` to the linker for B and C. :file:`A.lib` does not contain code; it "
|
||||
"just contains information which will be used at runtime to access A's code."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:94
|
||||
msgid ""
|
||||
"In Windows, using an import library is sort of like using ``import spam``; "
|
||||
"it gives you access to spam's names, but does not create a separate copy. "
|
||||
"On Unix, linking with a library is more like ``from spam import *``; it does "
|
||||
"create a separate copy."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:103
|
||||
msgid "Using DLLs in Practice"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:108
|
||||
msgid ""
|
||||
"Windows Python is built in Microsoft Visual C++; using other compilers may "
|
||||
"or may not work (though Borland seems to). The rest of this section is MSVC+"
|
||||
"+ specific."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:112
|
||||
msgid ""
|
||||
"When creating DLLs in Windows, you must pass :file:`pythonXY.lib` to the "
|
||||
"linker. To build two DLLs, spam and ni (which uses C functions found in "
|
||||
"spam), you could use these commands::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:119
|
||||
msgid ""
|
||||
"The first command created three files: :file:`spam.obj`, :file:`spam.dll` "
|
||||
"and :file:`spam.lib`. :file:`Spam.dll` does not contain any Python "
|
||||
"functions (such as :c:func:`PyArg_ParseTuple`), but it does know how to find "
|
||||
"the Python code thanks to :file:`pythonXY.lib`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:124
|
||||
msgid ""
|
||||
"The second command created :file:`ni.dll` (and :file:`.obj` and :file:`."
|
||||
"lib`), which knows how to find the necessary functions from spam, and also "
|
||||
"from the Python executable."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:128
|
||||
msgid ""
|
||||
"Not every identifier is exported to the lookup table. If you want any other "
|
||||
"modules (including Python) to be able to see your identifiers, you have to "
|
||||
"say ``_declspec(dllexport)``, as in ``void _declspec(dllexport) "
|
||||
"initspam(void)`` or ``PyObject _declspec(dllexport) *NiGetSpamData(void)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/extending/windows.rst:133
|
||||
msgid ""
|
||||
"Developer Studio will throw in a lot of import libraries that you do not "
|
||||
"really need, adding about 100K to your executable. To get rid of them, use "
|
||||
"the Project Settings dialog, Link tab, to specify *ignore default "
|
||||
"libraries*. Add the correct :file:`msvcrtxx.lib` to the list of libraries."
|
||||
msgstr ""
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,387 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/faq/extending.rst:3
|
||||
msgid "Extending/Embedding FAQ"
|
||||
msgstr "FAQ Extension/Intégration"
|
||||
|
||||
#: ../Doc/faq/extending.rst:16
|
||||
msgid "Can I create my own functions in C?"
|
||||
msgstr "Puis-je créer mes propres fonctions en C ?"
|
||||
|
||||
#: ../Doc/faq/extending.rst:18
|
||||
msgid ""
|
||||
"Yes, you can create built-in modules containing functions, variables, "
|
||||
"exceptions and even new types in C. This is explained in the document :ref:"
|
||||
"`extending-index`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:22
|
||||
msgid "Most intermediate or advanced Python books will also cover this topic."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:26
|
||||
msgid "Can I create my own functions in C++?"
|
||||
msgstr "Puis-je créer mes propres fonctions en C++ ?"
|
||||
|
||||
#: ../Doc/faq/extending.rst:28
|
||||
msgid ""
|
||||
"Yes, using the C compatibility features found in C++. Place ``extern \"C"
|
||||
"\" { ... }`` around the Python include files and put ``extern \"C\"`` before "
|
||||
"each function that is going to be called by the Python interpreter. Global "
|
||||
"or static C++ objects with constructors are probably not a good idea."
|
||||
msgstr ""
|
||||
"Oui, en utilisant les fonctionnalités de compatibilité C existantes en C++. "
|
||||
"Placez ``extern \"C\" { ... }`` autour des fichiers Python inclus et mettez "
|
||||
"``extern \"C\"`` avant chaque fonction qui va être appelée par "
|
||||
"l'interpréteur Python. Les objets C++ globaux ou statiques avec les "
|
||||
"constructeurs ne sont probablement pas une bonne idée."
|
||||
|
||||
#: ../Doc/faq/extending.rst:37
|
||||
msgid "Writing C is hard; are there any alternatives?"
|
||||
msgstr "Écrire directement en C est difficile ; existe-t-il des alternatives ?"
|
||||
|
||||
#: ../Doc/faq/extending.rst:39
|
||||
msgid ""
|
||||
"There are a number of alternatives to writing your own C extensions, "
|
||||
"depending on what you're trying to do."
|
||||
msgstr ""
|
||||
"Il y a un certain nombre de solutions existantes qui vous permettent "
|
||||
"d'écrire vos propres extensions C, selon ce que vous essayez de faire."
|
||||
|
||||
#: ../Doc/faq/extending.rst:44
|
||||
msgid ""
|
||||
"`Cython <http://cython.org>`_ and its relative `Pyrex <https://www.cosc."
|
||||
"canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ are compilers that accept a "
|
||||
"slightly modified form of Python and generate the corresponding C code. "
|
||||
"Cython and Pyrex make it possible to write an extension without having to "
|
||||
"learn Python's C API."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:50
|
||||
msgid ""
|
||||
"If you need to interface to some C or C++ library for which no Python "
|
||||
"extension currently exists, you can try wrapping the library's data types "
|
||||
"and functions with a tool such as `SWIG <http://www.swig.org>`_. `SIP "
|
||||
"<https://riverbankcomputing.com/software/sip/intro>`__, `CXX <http://cxx."
|
||||
"sourceforge.net/>`_ `Boost <http://www.boost.org/libs/python/doc/index."
|
||||
"html>`_, or `Weave <https://scipy.github.io/devdocs/tutorial/weave.html>`_ "
|
||||
"are also alternatives for wrapping C++ libraries."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:61
|
||||
msgid "How can I execute arbitrary Python statements from C?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:63
|
||||
msgid ""
|
||||
"The highest-level function to do this is :c:func:`PyRun_SimpleString` which "
|
||||
"takes a single string argument to be executed in the context of the module "
|
||||
"``__main__`` and returns 0 for success and -1 when an exception occurred "
|
||||
"(including ``SyntaxError``). If you want more control, use :c:func:"
|
||||
"`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` in ``Python/"
|
||||
"pythonrun.c``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:72
|
||||
msgid "How can I evaluate an arbitrary Python expression from C?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:74
|
||||
msgid ""
|
||||
"Call the function :c:func:`PyRun_String` from the previous question with the "
|
||||
"start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it "
|
||||
"and returns its value."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:80
|
||||
msgid "How do I extract C values from a Python object?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:82
|
||||
msgid ""
|
||||
"That depends on the object's type. If it's a tuple, :c:func:`PyTuple_Size` "
|
||||
"returns its length and :c:func:`PyTuple_GetItem` returns the item at a "
|
||||
"specified index. Lists have similar functions, :c:func:`PyListSize` and :c:"
|
||||
"func:`PyList_GetItem`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:87
|
||||
msgid ""
|
||||
"For bytes, :c:func:`PyBytes_Size` returns its length and :c:func:"
|
||||
"`PyBytes_AsStringAndSize` provides a pointer to its value and its length. "
|
||||
"Note that Python bytes objects may contain null bytes so C's :c:func:"
|
||||
"`strlen` should not be used."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:92
|
||||
msgid ""
|
||||
"To test the type of an object, first make sure it isn't *NULL*, and then "
|
||||
"use :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:"
|
||||
"`PyList_Check`, etc."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:95
|
||||
msgid ""
|
||||
"There is also a high-level API to Python objects which is provided by the so-"
|
||||
"called 'abstract' interface -- read ``Include/abstract.h`` for further "
|
||||
"details. It allows interfacing with any kind of Python sequence using calls "
|
||||
"like :c:func:`PySequence_Length`, :c:func:`PySequence_GetItem`, etc. as well "
|
||||
"as many other useful protocols such as numbers (:c:func:`PyNumber_Index` et "
|
||||
"al.) and mappings in the PyMapping APIs."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:104
|
||||
msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:106
|
||||
msgid "You can't. Use :c:func:`PyTuple_Pack` instead."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:110
|
||||
msgid "How do I call an object's method from C?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:112
|
||||
msgid ""
|
||||
"The :c:func:`PyObject_CallMethod` function can be used to call an arbitrary "
|
||||
"method of an object. The parameters are the object, the name of the method "
|
||||
"to call, a format string like that used with :c:func:`Py_BuildValue`, and "
|
||||
"the argument values::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:121
|
||||
msgid ""
|
||||
"This works for any object that has methods -- whether built-in or user-"
|
||||
"defined. You are responsible for eventually :c:func:`Py_DECREF`\\ 'ing the "
|
||||
"return value."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:124
|
||||
msgid ""
|
||||
"To call, e.g., a file object's \"seek\" method with arguments 10, 0 "
|
||||
"(assuming the file object pointer is \"f\")::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:135
|
||||
msgid ""
|
||||
"Note that since :c:func:`PyObject_CallObject` *always* wants a tuple for the "
|
||||
"argument list, to call a function without arguments, pass \"()\" for the "
|
||||
"format, and to call a function with one argument, surround the argument in "
|
||||
"parentheses, e.g. \"(i)\"."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:142
|
||||
msgid ""
|
||||
"How do I catch the output from PyErr_Print() (or anything that prints to "
|
||||
"stdout/stderr)?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:144
|
||||
msgid ""
|
||||
"In Python code, define an object that supports the ``write()`` method. "
|
||||
"Assign this object to :data:`sys.stdout` and :data:`sys.stderr`. Call "
|
||||
"print_error, or just allow the standard traceback mechanism to work. Then, "
|
||||
"the output will go wherever your ``write()`` method sends it."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:149
|
||||
msgid "The easiest way to do this is to use the :class:`io.StringIO` class:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:161
|
||||
msgid "A custom object to do the same would look like this:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:182
|
||||
msgid "How do I access a module written in Python from C?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:184
|
||||
msgid "You can get a pointer to the module object as follows::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:188
|
||||
msgid ""
|
||||
"If the module hasn't been imported yet (i.e. it is not yet present in :data:"
|
||||
"`sys.modules`), this initializes the module; otherwise it simply returns the "
|
||||
"value of ``sys.modules[\"<modulename>\"]``. Note that it doesn't enter the "
|
||||
"module into any namespace -- it only ensures it has been initialized and is "
|
||||
"stored in :data:`sys.modules`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:194
|
||||
msgid ""
|
||||
"You can then access the module's attributes (i.e. any name defined in the "
|
||||
"module) as follows::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:199
|
||||
msgid ""
|
||||
"Calling :c:func:`PyObject_SetAttrString` to assign to variables in the "
|
||||
"module also works."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:204
|
||||
msgid "How do I interface to C++ objects from Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:206
|
||||
msgid ""
|
||||
"Depending on your requirements, there are many approaches. To do this "
|
||||
"manually, begin by reading :ref:`the \"Extending and Embedding\" document "
|
||||
"<extending-index>`. Realize that for the Python run-time system, there "
|
||||
"isn't a whole lot of difference between C and C++ -- so the strategy of "
|
||||
"building a new Python type around a C structure (pointer) type will also "
|
||||
"work for C++ objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:212
|
||||
msgid "For C++ libraries, see :ref:`c-wrapper-software`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:216
|
||||
msgid "I added a module using the Setup file and the make fails; why?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:218
|
||||
msgid ""
|
||||
"Setup must end in a newline, if there is no newline there, the build process "
|
||||
"fails. (Fixing this requires some ugly shell script hackery, and this bug "
|
||||
"is so minor that it doesn't seem worth the effort.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:224
|
||||
msgid "How do I debug an extension?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:226
|
||||
msgid ""
|
||||
"When using GDB with dynamically loaded extensions, you can't set a "
|
||||
"breakpoint in your extension until your extension is loaded."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:229
|
||||
msgid "In your ``.gdbinit`` file (or interactively), add the command:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:235
|
||||
msgid "Then, when you run GDB:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:247
|
||||
msgid ""
|
||||
"I want to compile a Python module on my Linux system, but some files are "
|
||||
"missing. Why?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:249
|
||||
msgid ""
|
||||
"Most packaged versions of Python don't include the :file:`/usr/lib/python2."
|
||||
"{x}/config/` directory, which contains various files required for compiling "
|
||||
"Python extensions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:253
|
||||
msgid "For Red Hat, install the python-devel RPM to get the necessary files."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:255
|
||||
msgid "For Debian, run ``apt-get install python-dev``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:259
|
||||
msgid "How do I tell \"incomplete input\" from \"invalid input\"?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:261
|
||||
msgid ""
|
||||
"Sometimes you want to emulate the Python interactive interpreter's behavior, "
|
||||
"where it gives you a continuation prompt when the input is incomplete (e.g. "
|
||||
"you typed the start of an \"if\" statement or you didn't close your "
|
||||
"parentheses or triple string quotes), but it gives you a syntax error "
|
||||
"message immediately when the input is invalid."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:267
|
||||
msgid ""
|
||||
"In Python you can use the :mod:`codeop` module, which approximates the "
|
||||
"parser's behavior sufficiently. IDLE uses this, for example."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:270
|
||||
msgid ""
|
||||
"The easiest way to do it in C is to call :c:func:`PyRun_InteractiveLoop` "
|
||||
"(perhaps in a separate thread) and let the Python interpreter handle the "
|
||||
"input for you. You can also set the :c:func:`PyOS_ReadlineFunctionPointer` "
|
||||
"to point at your custom input function. See ``Modules/readline.c`` and "
|
||||
"``Parser/myreadline.c`` for more hints."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:276
|
||||
msgid ""
|
||||
"However sometimes you have to run the embedded Python interpreter in the "
|
||||
"same thread as your rest application and you can't allow the :c:func:"
|
||||
"`PyRun_InteractiveLoop` to stop while waiting for user input. The one "
|
||||
"solution then is to call :c:func:`PyParser_ParseString` and test for ``e."
|
||||
"error`` equal to ``E_EOF``, which means the input is incomplete). Here's a "
|
||||
"sample code fragment, untested, inspired by code from Alex Farber::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:309
|
||||
msgid ""
|
||||
"Another solution is trying to compile the received string with :c:func:"
|
||||
"`Py_CompileString`. If it compiles without errors, try to execute the "
|
||||
"returned code object by calling :c:func:`PyEval_EvalCode`. Otherwise save "
|
||||
"the input for later. If the compilation fails, find out if it's an error or "
|
||||
"just more input is required - by extracting the message string from the "
|
||||
"exception tuple and comparing it to the string \"unexpected EOF while parsing"
|
||||
"\". Here is a complete example using the GNU readline library (you may want "
|
||||
"to ignore **SIGINT** while calling readline())::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:430
|
||||
msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:432
|
||||
msgid ""
|
||||
"To dynamically load g++ extension modules, you must recompile Python, relink "
|
||||
"it using g++ (change LINKCC in the Python Modules Makefile), and link your "
|
||||
"extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:438
|
||||
msgid ""
|
||||
"Can I create an object class with some methods implemented in C and others "
|
||||
"in Python (e.g. through inheritance)?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:440
|
||||
msgid ""
|
||||
"Yes, you can inherit from built-in classes such as :class:`int`, :class:"
|
||||
"`list`, :class:`dict`, etc."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/extending.rst:443
|
||||
msgid ""
|
||||
"The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index."
|
||||
"html) provides a way of doing this from C++ (i.e. you can inherit from an "
|
||||
"extension class written in C++ using the BPL)."
|
||||
msgstr ""
|
|
@ -0,0 +1,636 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/faq/general.rst:5
|
||||
msgid "General Python FAQ"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:13
|
||||
msgid "General Information"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:16
|
||||
msgid "What is Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:18
|
||||
msgid ""
|
||||
"Python is an interpreted, interactive, object-oriented programming "
|
||||
"language. It incorporates modules, exceptions, dynamic typing, very high "
|
||||
"level dynamic data types, and classes. Python combines remarkable power "
|
||||
"with very clear syntax. It has interfaces to many system calls and "
|
||||
"libraries, as well as to various window systems, and is extensible in C or C+"
|
||||
"+. It is also usable as an extension language for applications that need a "
|
||||
"programmable interface. Finally, Python is portable: it runs on many Unix "
|
||||
"variants, on the Mac, and on Windows 2000 and later."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:27
|
||||
msgid ""
|
||||
"To find out more, start with :ref:`tutorial-index`. The `Beginner's Guide "
|
||||
"to Python <https://wiki.python.org/moin/BeginnersGuide>`_ links to other "
|
||||
"introductory tutorials and resources for learning Python."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:33
|
||||
msgid "What is the Python Software Foundation?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:35
|
||||
msgid ""
|
||||
"The Python Software Foundation is an independent non-profit organization "
|
||||
"that holds the copyright on Python versions 2.1 and newer. The PSF's "
|
||||
"mission is to advance open source technology related to the Python "
|
||||
"programming language and to publicize the use of Python. The PSF's home "
|
||||
"page is at https://www.python.org/psf/."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:41
|
||||
msgid ""
|
||||
"Donations to the PSF are tax-exempt in the US. If you use Python and find "
|
||||
"it helpful, please contribute via `the PSF donation page <https://www.python."
|
||||
"org/psf/donations/>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:47
|
||||
msgid "Are there copyright restrictions on the use of Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:49
|
||||
msgid ""
|
||||
"You can do anything you want with the source, as long as you leave the "
|
||||
"copyrights in and display those copyrights in any documentation about Python "
|
||||
"that you produce. If you honor the copyright rules, it's OK to use Python "
|
||||
"for commercial use, to sell copies of Python in source or binary form "
|
||||
"(modified or unmodified), or to sell products that incorporate Python in "
|
||||
"some form. We would still like to know about all commercial use of Python, "
|
||||
"of course."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:56
|
||||
msgid ""
|
||||
"See `the PSF license page <https://www.python.org/psf/license/>`_ to find "
|
||||
"further explanations and a link to the full text of the license."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:59
|
||||
msgid ""
|
||||
"The Python logo is trademarked, and in certain cases permission is required "
|
||||
"to use it. Consult `the Trademark Usage Policy <https://www.python.org/psf/"
|
||||
"trademarks/>`__ for more information."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:65
|
||||
msgid "Why was Python created in the first place?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:67
|
||||
msgid ""
|
||||
"Here's a *very* brief summary of what started it all, written by Guido van "
|
||||
"Rossum:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:70
|
||||
msgid ""
|
||||
"I had extensive experience with implementing an interpreted language in the "
|
||||
"ABC group at CWI, and from working with this group I had learned a lot about "
|
||||
"language design. This is the origin of many Python features, including the "
|
||||
"use of indentation for statement grouping and the inclusion of very-high-"
|
||||
"level data types (although the details are all different in Python)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:77
|
||||
msgid ""
|
||||
"I had a number of gripes about the ABC language, but also liked many of its "
|
||||
"features. It was impossible to extend the ABC language (or its "
|
||||
"implementation) to remedy my complaints -- in fact its lack of extensibility "
|
||||
"was one of its biggest problems. I had some experience with using Modula-2+ "
|
||||
"and talked with the designers of Modula-3 and read the Modula-3 report. "
|
||||
"Modula-3 is the origin of the syntax and semantics used for exceptions, and "
|
||||
"some other Python features."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:85
|
||||
msgid ""
|
||||
"I was working in the Amoeba distributed operating system group at CWI. We "
|
||||
"needed a better way to do system administration than by writing either C "
|
||||
"programs or Bourne shell scripts, since Amoeba had its own system call "
|
||||
"interface which wasn't easily accessible from the Bourne shell. My "
|
||||
"experience with error handling in Amoeba made me acutely aware of the "
|
||||
"importance of exceptions as a programming language feature."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:92
|
||||
msgid ""
|
||||
"It occurred to me that a scripting language with a syntax like ABC but with "
|
||||
"access to the Amoeba system calls would fill the need. I realized that it "
|
||||
"would be foolish to write an Amoeba-specific language, so I decided that I "
|
||||
"needed a language that was generally extensible."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:97
|
||||
msgid ""
|
||||
"During the 1989 Christmas holidays, I had a lot of time on my hand, so I "
|
||||
"decided to give it a try. During the next year, while still mostly working "
|
||||
"on it in my own time, Python was used in the Amoeba project with increasing "
|
||||
"success, and the feedback from colleagues made me add many early "
|
||||
"improvements."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:103
|
||||
msgid ""
|
||||
"In February 1991, after just over a year of development, I decided to post "
|
||||
"to USENET. The rest is in the ``Misc/HISTORY`` file."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:108
|
||||
msgid "What is Python good for?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:110
|
||||
msgid ""
|
||||
"Python is a high-level general-purpose programming language that can be "
|
||||
"applied to many different classes of problems."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:113
|
||||
msgid ""
|
||||
"The language comes with a large standard library that covers areas such as "
|
||||
"string processing (regular expressions, Unicode, calculating differences "
|
||||
"between files), Internet protocols (HTTP, FTP, SMTP, XML-RPC, POP, IMAP, CGI "
|
||||
"programming), software engineering (unit testing, logging, profiling, "
|
||||
"parsing Python code), and operating system interfaces (system calls, "
|
||||
"filesystems, TCP/IP sockets). Look at the table of contents for :ref:"
|
||||
"`library-index` to get an idea of what's available. A wide variety of third-"
|
||||
"party extensions are also available. Consult `the Python Package Index "
|
||||
"<https://pypi.python.org/pypi>`_ to find packages of interest to you."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:125
|
||||
msgid "How does the Python version numbering scheme work?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:127
|
||||
msgid ""
|
||||
"Python versions are numbered A.B.C or A.B. A is the major version number -- "
|
||||
"it is only incremented for really major changes in the language. B is the "
|
||||
"minor version number, incremented for less earth-shattering changes. C is "
|
||||
"the micro-level -- it is incremented for each bugfix release. See :pep:`6` "
|
||||
"for more information about bugfix releases."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:133
|
||||
msgid ""
|
||||
"Not all releases are bugfix releases. In the run-up to a new major release, "
|
||||
"a series of development releases are made, denoted as alpha, beta, or "
|
||||
"release candidate. Alphas are early releases in which interfaces aren't yet "
|
||||
"finalized; it's not unexpected to see an interface change between two alpha "
|
||||
"releases. Betas are more stable, preserving existing interfaces but possibly "
|
||||
"adding new modules, and release candidates are frozen, making no changes "
|
||||
"except as needed to fix critical bugs."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:141
|
||||
msgid ""
|
||||
"Alpha, beta and release candidate versions have an additional suffix. The "
|
||||
"suffix for an alpha version is \"aN\" for some small number N, the suffix "
|
||||
"for a beta version is \"bN\" for some small number N, and the suffix for a "
|
||||
"release candidate version is \"cN\" for some small number N. In other "
|
||||
"words, all versions labeled 2.0aN precede the versions labeled 2.0bN, which "
|
||||
"precede versions labeled 2.0cN, and *those* precede 2.0."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:148
|
||||
msgid ""
|
||||
"You may also find version numbers with a \"+\" suffix, e.g. \"2.2+\". These "
|
||||
"are unreleased versions, built directly from the CPython development "
|
||||
"repository. In practice, after a final minor release is made, the version "
|
||||
"is incremented to the next minor version, which becomes the \"a0\" version, "
|
||||
"e.g. \"2.4a0\"."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:153
|
||||
msgid ""
|
||||
"See also the documentation for :data:`sys.version`, :data:`sys.hexversion`, "
|
||||
"and :data:`sys.version_info`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:158
|
||||
msgid "How do I obtain a copy of the Python source?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:160
|
||||
msgid ""
|
||||
"The latest Python source distribution is always available from python.org, "
|
||||
"at https://www.python.org/downloads/. The latest development sources can be "
|
||||
"obtained via anonymous Mercurial access at https://hg.python.org/cpython."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:164
|
||||
msgid ""
|
||||
"The source distribution is a gzipped tar file containing the complete C "
|
||||
"source, Sphinx-formatted documentation, Python library modules, example "
|
||||
"programs, and several useful pieces of freely distributable software. The "
|
||||
"source will compile and run out of the box on most UNIX platforms."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:169
|
||||
msgid ""
|
||||
"Consult the `Getting Started section of the Python Developer's Guide "
|
||||
"<https://docs.python.org/devguide/setup.html>`__ for more information on "
|
||||
"getting the source code and compiling it."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:175
|
||||
msgid "How do I get documentation on Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:179
|
||||
msgid ""
|
||||
"The standard documentation for the current stable version of Python is "
|
||||
"available at https://docs.python.org/3/. PDF, plain text, and downloadable "
|
||||
"HTML versions are also available at https://docs.python.org/3/download.html."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:183
|
||||
msgid ""
|
||||
"The documentation is written in reStructuredText and processed by `the "
|
||||
"Sphinx documentation tool <http://sphinx-doc.org/>`__. The reStructuredText "
|
||||
"source for the documentation is part of the Python source distribution."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:189
|
||||
msgid "I've never programmed before. Is there a Python tutorial?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:191
|
||||
msgid ""
|
||||
"There are numerous tutorials and books available. The standard "
|
||||
"documentation includes :ref:`tutorial-index`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:194
|
||||
msgid ""
|
||||
"Consult `the Beginner's Guide <https://wiki.python.org/moin/"
|
||||
"BeginnersGuide>`_ to find information for beginning Python programmers, "
|
||||
"including lists of tutorials."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:199
|
||||
msgid "Is there a newsgroup or mailing list devoted to Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:201
|
||||
msgid ""
|
||||
"There is a newsgroup, :newsgroup:`comp.lang.python`, and a mailing list, "
|
||||
"`python-list <https://mail.python.org/mailman/listinfo/python-list>`_. The "
|
||||
"newsgroup and mailing list are gatewayed into each other -- if you can read "
|
||||
"news it's unnecessary to subscribe to the mailing list. :newsgroup:`comp."
|
||||
"lang.python` is high-traffic, receiving hundreds of postings every day, and "
|
||||
"Usenet readers are often more able to cope with this volume."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:208
|
||||
msgid ""
|
||||
"Announcements of new software releases and events can be found in comp.lang."
|
||||
"python.announce, a low-traffic moderated list that receives about five "
|
||||
"postings per day. It's available as `the python-announce mailing list "
|
||||
"<https://mail.python.org/mailman/listinfo/python-announce-list>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:213
|
||||
msgid ""
|
||||
"More info about other mailing lists and newsgroups can be found at https://"
|
||||
"www.python.org/community/lists/."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:218
|
||||
msgid "How do I get a beta test version of Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:220
|
||||
msgid ""
|
||||
"Alpha and beta releases are available from https://www.python.org/"
|
||||
"downloads/. All releases are announced on the comp.lang.python and comp."
|
||||
"lang.python.announce newsgroups and on the Python home page at https://www."
|
||||
"python.org/; an RSS feed of news is available."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:225
|
||||
msgid ""
|
||||
"You can also access the development version of Python through Mercurial. "
|
||||
"See https://docs.python.org/devguide/faq.html for details."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:230
|
||||
msgid "How do I submit bug reports and patches for Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:232
|
||||
msgid ""
|
||||
"To report a bug or submit a patch, please use the Roundup installation at "
|
||||
"https://bugs.python.org/."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:235
|
||||
msgid ""
|
||||
"You must have a Roundup account to report bugs; this makes it possible for "
|
||||
"us to contact you if we have follow-up questions. It will also enable "
|
||||
"Roundup to send you updates as we act on your bug. If you had previously "
|
||||
"used SourceForge to report bugs to Python, you can obtain your Roundup "
|
||||
"password through Roundup's `password reset procedure <https://bugs.python."
|
||||
"org/user?@template=forgotten>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:241
|
||||
msgid ""
|
||||
"For more information on how Python is developed, consult `the Python "
|
||||
"Developer's Guide <https://docs.python.org/devguide/>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:246
|
||||
msgid "Are there any published articles about Python that I can reference?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:248
|
||||
msgid "It's probably best to cite your favorite book about Python."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:250
|
||||
msgid ""
|
||||
"The very first article about Python was written in 1991 and is now quite "
|
||||
"outdated."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:253
|
||||
msgid ""
|
||||
"Guido van Rossum and Jelke de Boer, \"Interactively Testing Remote Servers "
|
||||
"Using the Python Programming Language\", CWI Quarterly, Volume 4, Issue 4 "
|
||||
"(December 1991), Amsterdam, pp 283-303."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:259
|
||||
msgid "Are there any books on Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:261
|
||||
msgid ""
|
||||
"Yes, there are many, and more are being published. See the python.org wiki "
|
||||
"at https://wiki.python.org/moin/PythonBooks for a list."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:264
|
||||
msgid ""
|
||||
"You can also search online bookstores for \"Python\" and filter out the "
|
||||
"Monty Python references; or perhaps search for \"Python\" and \"language\"."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:269
|
||||
msgid "Where in the world is www.python.org located?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:271
|
||||
msgid ""
|
||||
"The Python project's infrastructure is located all over the world. `www."
|
||||
"python.org <https://www.python.org>`_ is graciously hosted by `Rackspace "
|
||||
"<https://www.rackspace.com>`_, with CDN caching provided by `Fastly <https://"
|
||||
"www.fastly.com>`_. `Upfront Systems <http://www.upfrontsystems.co.za/>`_ "
|
||||
"hosts `bugs.python.org <https://bugs.python.org>`_. Many other Python "
|
||||
"services like `the Wiki <https://wiki.python.org>`_ are hosted by `Oregon "
|
||||
"State University Open Source Lab <https://osuosl.org>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:282
|
||||
msgid "Why is it called Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:284
|
||||
msgid ""
|
||||
"When he began implementing Python, Guido van Rossum was also reading the "
|
||||
"published scripts from `\"Monty Python's Flying Circus\" <https://en."
|
||||
"wikipedia.org/wiki/Monty_Python>`__, a BBC comedy series from the 1970s. "
|
||||
"Van Rossum thought he needed a name that was short, unique, and slightly "
|
||||
"mysterious, so he decided to call the language Python."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:292
|
||||
msgid "Do I have to like \"Monty Python's Flying Circus\"?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:294
|
||||
msgid "No, but it helps. :)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:298
|
||||
msgid "Python in the real world"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:301
|
||||
msgid "How stable is Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:303
|
||||
msgid ""
|
||||
"Very stable. New, stable releases have been coming out roughly every 6 to "
|
||||
"18 months since 1991, and this seems likely to continue. Currently there "
|
||||
"are usually around 18 months between major releases."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:307
|
||||
msgid ""
|
||||
"The developers issue \"bugfix\" releases of older versions, so the stability "
|
||||
"of existing releases gradually improves. Bugfix releases, indicated by a "
|
||||
"third component of the version number (e.g. 2.5.3, 2.6.2), are managed for "
|
||||
"stability; only fixes for known problems are included in a bugfix release, "
|
||||
"and it's guaranteed that interfaces will remain the same throughout a series "
|
||||
"of bugfix releases."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:314
|
||||
msgid ""
|
||||
"The latest stable releases can always be found on the `Python download page "
|
||||
"<https://www.python.org/downloads/>`_. There are two recommended production-"
|
||||
"ready versions at this point in time, because at the moment there are two "
|
||||
"branches of stable releases: 2.x and 3.x. Python 3.x may be less useful "
|
||||
"than 2.x, since currently there is more third party software available for "
|
||||
"Python 2 than for Python 3. Python 2 code will generally not run unchanged "
|
||||
"in Python 3."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:323
|
||||
msgid "How many people are using Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:325
|
||||
msgid ""
|
||||
"There are probably tens of thousands of users, though it's difficult to "
|
||||
"obtain an exact count."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:328
|
||||
msgid ""
|
||||
"Python is available for free download, so there are no sales figures, and "
|
||||
"it's available from many different sites and packaged with many Linux "
|
||||
"distributions, so download statistics don't tell the whole story either."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:332
|
||||
msgid ""
|
||||
"The comp.lang.python newsgroup is very active, but not all Python users post "
|
||||
"to the group or even read it."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:337
|
||||
msgid "Have any significant projects been done in Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:339
|
||||
msgid ""
|
||||
"See https://www.python.org/about/success for a list of projects that use "
|
||||
"Python. Consulting the proceedings for `past Python conferences <https://www."
|
||||
"python.org/community/workshops/>`_ will reveal contributions from many "
|
||||
"different companies and organizations."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:344
|
||||
msgid ""
|
||||
"High-profile Python projects include `the Mailman mailing list manager "
|
||||
"<http://www.list.org>`_ and `the Zope application server <http://www.zope."
|
||||
"org>`_. Several Linux distributions, most notably `Red Hat <https://www."
|
||||
"redhat.com>`_, have written part or all of their installer and system "
|
||||
"administration software in Python. Companies that use Python internally "
|
||||
"include Google, Yahoo, and Lucasfilm Ltd."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:353
|
||||
msgid "What new developments are expected for Python in the future?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:355
|
||||
msgid ""
|
||||
"See https://www.python.org/dev/peps/ for the Python Enhancement Proposals "
|
||||
"(PEPs). PEPs are design documents describing a suggested new feature for "
|
||||
"Python, providing a concise technical specification and a rationale. Look "
|
||||
"for a PEP titled \"Python X.Y Release Schedule\", where X.Y is a version "
|
||||
"that hasn't been publicly released yet."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:361
|
||||
msgid ""
|
||||
"New development is discussed on `the python-dev mailing list <https://mail."
|
||||
"python.org/mailman/listinfo/python-dev/>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:366
|
||||
msgid "Is it reasonable to propose incompatible changes to Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:368
|
||||
msgid ""
|
||||
"In general, no. There are already millions of lines of Python code around "
|
||||
"the world, so any change in the language that invalidates more than a very "
|
||||
"small fraction of existing programs has to be frowned upon. Even if you can "
|
||||
"provide a conversion program, there's still the problem of updating all "
|
||||
"documentation; many books have been written about Python, and we don't want "
|
||||
"to invalidate them all at a single stroke."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:375
|
||||
msgid ""
|
||||
"Providing a gradual upgrade path is necessary if a feature has to be "
|
||||
"changed. :pep:`5` describes the procedure followed for introducing backward-"
|
||||
"incompatible changes while minimizing disruption for users."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:381
|
||||
msgid "Is Python a good language for beginning programmers?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:383
|
||||
msgid "Yes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:385
|
||||
msgid ""
|
||||
"It is still common to start students with a procedural and statically typed "
|
||||
"language such as Pascal, C, or a subset of C++ or Java. Students may be "
|
||||
"better served by learning Python as their first language. Python has a very "
|
||||
"simple and consistent syntax and a large standard library and, most "
|
||||
"importantly, using Python in a beginning programming course lets students "
|
||||
"concentrate on important programming skills such as problem decomposition "
|
||||
"and data type design. With Python, students can be quickly introduced to "
|
||||
"basic concepts such as loops and procedures. They can probably even work "
|
||||
"with user-defined objects in their very first course."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:395
|
||||
msgid ""
|
||||
"For a student who has never programmed before, using a statically typed "
|
||||
"language seems unnatural. It presents additional complexity that the "
|
||||
"student must master and slows the pace of the course. The students are "
|
||||
"trying to learn to think like a computer, decompose problems, design "
|
||||
"consistent interfaces, and encapsulate data. While learning to use a "
|
||||
"statically typed language is important in the long term, it is not "
|
||||
"necessarily the best topic to address in the students' first programming "
|
||||
"course."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:403
|
||||
msgid ""
|
||||
"Many other aspects of Python make it a good first language. Like Java, "
|
||||
"Python has a large standard library so that students can be assigned "
|
||||
"programming projects very early in the course that *do* something. "
|
||||
"Assignments aren't restricted to the standard four-function calculator and "
|
||||
"check balancing programs. By using the standard library, students can gain "
|
||||
"the satisfaction of working on realistic applications as they learn the "
|
||||
"fundamentals of programming. Using the standard library also teaches "
|
||||
"students about code reuse. Third-party modules such as PyGame are also "
|
||||
"helpful in extending the students' reach."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:412
|
||||
msgid ""
|
||||
"Python's interactive interpreter enables students to test language features "
|
||||
"while they're programming. They can keep a window with the interpreter "
|
||||
"running while they enter their program's source in another window. If they "
|
||||
"can't remember the methods for a list, they can do something like this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:441
|
||||
msgid ""
|
||||
"With the interpreter, documentation is never far from the student as they "
|
||||
"are programming."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:444
|
||||
msgid ""
|
||||
"There are also good IDEs for Python. IDLE is a cross-platform IDE for "
|
||||
"Python that is written in Python using Tkinter. PythonWin is a Windows-"
|
||||
"specific IDE. Emacs users will be happy to know that there is a very good "
|
||||
"Python mode for Emacs. All of these programming environments provide syntax "
|
||||
"highlighting, auto-indenting, and access to the interactive interpreter "
|
||||
"while coding. Consult `the Python wiki <https://wiki.python.org/moin/"
|
||||
"PythonEditors>`_ for a full list of Python editing environments."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/general.rst:452
|
||||
msgid ""
|
||||
"If you want to discuss Python's use in education, you may be interested in "
|
||||
"joining `the edu-sig mailing list <https://www.python.org/community/sigs/"
|
||||
"current/edu-sig>`_."
|
||||
msgstr ""
|
|
@ -0,0 +1,235 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/faq/gui.rst:5
|
||||
msgid "Graphic User Interface FAQ"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:15
|
||||
msgid "General GUI Questions"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:18
|
||||
msgid "What platform-independent GUI toolkits exist for Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:20
|
||||
msgid ""
|
||||
"Depending on what platform(s) you are aiming at, there are several. Some of "
|
||||
"them haven't been ported to Python 3 yet. At least `Tkinter`_ and `Qt`_ are "
|
||||
"known to be Python 3-compatible."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:27
|
||||
msgid "Tkinter"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:29
|
||||
msgid ""
|
||||
"Standard builds of Python include an object-oriented interface to the Tcl/Tk "
|
||||
"widget set, called :ref:`tkinter <Tkinter>`. This is probably the easiest "
|
||||
"to install (since it comes included with most `binary distributions <https://"
|
||||
"www.python.org/downloads/>`_ of Python) and use. For more info about Tk, "
|
||||
"including pointers to the source, see the `Tcl/Tk home page <https://www.tcl."
|
||||
"tk>`_. Tcl/Tk is fully portable to the Mac OS X, Windows, and Unix "
|
||||
"platforms."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:38
|
||||
msgid "wxWidgets"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:40
|
||||
msgid ""
|
||||
"wxWidgets (https://www.wxwidgets.org) is a free, portable GUI class library "
|
||||
"written in C++ that provides a native look and feel on a number of "
|
||||
"platforms, with Windows, Mac OS X, GTK, X11, all listed as current stable "
|
||||
"targets. Language bindings are available for a number of languages "
|
||||
"including Python, Perl, Ruby, etc."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:46
|
||||
msgid ""
|
||||
"wxPython (http://www.wxpython.org) is the Python binding for wxwidgets. "
|
||||
"While it often lags slightly behind the official wxWidgets releases, it also "
|
||||
"offers a number of features via pure Python extensions that are not "
|
||||
"available in other language bindings. There is an active wxPython user and "
|
||||
"developer community."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:52
|
||||
msgid ""
|
||||
"Both wxWidgets and wxPython are free, open source, software with permissive "
|
||||
"licences that allow their use in commercial products as well as in freeware "
|
||||
"or shareware."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:58
|
||||
msgid "Qt"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:60
|
||||
msgid ""
|
||||
"There are bindings available for the Qt toolkit (using either `PyQt <https://"
|
||||
"riverbankcomputing.com/software/pyqt/intro>`_ or `PySide <https://wiki.qt.io/"
|
||||
"PySide>`_) and for KDE (`PyKDE4 <https://techbase.kde.org/Languages/Python/"
|
||||
"Using_PyKDE_4>`__). PyQt is currently more mature than PySide, but you must "
|
||||
"buy a PyQt license from `Riverbank Computing <https://www.riverbankcomputing."
|
||||
"com/commercial/license-faq>`_ if you want to write proprietary "
|
||||
"applications. PySide is free for all applications."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:67
|
||||
msgid ""
|
||||
"Qt 4.5 upwards is licensed under the LGPL license; also, commercial licenses "
|
||||
"are available from `The Qt Company <https://www.qt.io/licensing/>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:71
|
||||
msgid "Gtk+"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:73
|
||||
msgid ""
|
||||
"The `GObject introspection bindings <https://wiki.gnome.org/Projects/"
|
||||
"PyGObject>`_ for Python allow you to write GTK+ 3 applications. There is "
|
||||
"also a `Python GTK+ 3 Tutorial <https://python-gtk-3-tutorial.readthedocs."
|
||||
"org/en/latest/>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:77
|
||||
msgid ""
|
||||
"The older PyGtk bindings for the `Gtk+ 2 toolkit <http://www.gtk.org>`_ have "
|
||||
"been implemented by James Henstridge; see <http://www.pygtk.org>."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:81
|
||||
msgid "FLTK"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:83
|
||||
msgid ""
|
||||
"Python bindings for `the FLTK toolkit <http://www.fltk.org>`_, a simple yet "
|
||||
"powerful and mature cross-platform windowing system, are available from `the "
|
||||
"PyFLTK project <http://pyfltk.sourceforge.net>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:89
|
||||
msgid "FOX"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:91
|
||||
msgid ""
|
||||
"A wrapper for `the FOX toolkit <http://www.fox-toolkit.org/>`_ called `FXpy "
|
||||
"<http://fxpy.sourceforge.net/>`_ is available. FOX supports both Unix "
|
||||
"variants and Windows."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:97
|
||||
msgid "OpenGL"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:99
|
||||
msgid "For OpenGL bindings, see `PyOpenGL <http://pyopengl.sourceforge.net>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:103
|
||||
msgid "What platform-specific GUI toolkits exist for Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:105
|
||||
msgid ""
|
||||
"By installing the `PyObjc Objective-C bridge <https://pythonhosted.org/"
|
||||
"pyobjc/>`_, Python programs can use Mac OS X's Cocoa libraries."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:109
|
||||
msgid ""
|
||||
":ref:`Pythonwin <windows-faq>` by Mark Hammond includes an interface to the "
|
||||
"Microsoft Foundation Classes and a Python programming environment that's "
|
||||
"written mostly in Python using the MFC classes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:115
|
||||
msgid "Tkinter questions"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:118
|
||||
msgid "How do I freeze Tkinter applications?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:120
|
||||
msgid ""
|
||||
"Freeze is a tool to create stand-alone applications. When freezing Tkinter "
|
||||
"applications, the applications will not be truly stand-alone, as the "
|
||||
"application will still need the Tcl and Tk libraries."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:124
|
||||
msgid ""
|
||||
"One solution is to ship the application with the Tcl and Tk libraries, and "
|
||||
"point to them at run-time using the :envvar:`TCL_LIBRARY` and :envvar:"
|
||||
"`TK_LIBRARY` environment variables."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:128
|
||||
msgid ""
|
||||
"To get truly stand-alone applications, the Tcl scripts that form the library "
|
||||
"have to be integrated into the application as well. One tool supporting that "
|
||||
"is SAM (stand-alone modules), which is part of the Tix distribution (http://"
|
||||
"tix.sourceforge.net/)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:133
|
||||
msgid ""
|
||||
"Build Tix with SAM enabled, perform the appropriate call to :c:func:"
|
||||
"`Tclsam_init`, etc. inside Python's :file:`Modules/tkappinit.c`, and link "
|
||||
"with libtclsam and libtksam (you might include the Tix libraries as well)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:140
|
||||
msgid "Can I have Tk events handled while waiting for I/O?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:142
|
||||
msgid ""
|
||||
"On platforms other than Windows, yes, and you don't even need threads! But "
|
||||
"you'll have to restructure your I/O code a bit. Tk has the equivalent of "
|
||||
"Xt's :c:func:`XtAddInput()` call, which allows you to register a callback "
|
||||
"function which will be called from the Tk mainloop when I/O is possible on a "
|
||||
"file descriptor. See :ref:`tkinter-file-handlers`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:150
|
||||
msgid "I can't get key bindings to work in Tkinter: why?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:152
|
||||
msgid ""
|
||||
"An often-heard complaint is that event handlers bound to events with the :"
|
||||
"meth:`bind` method don't get handled even when the appropriate key is "
|
||||
"pressed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/gui.rst:155
|
||||
msgid ""
|
||||
"The most common cause is that the widget to which the binding applies "
|
||||
"doesn't have \"keyboard focus\". Check out the Tk documentation for the "
|
||||
"focus command. Usually a widget is given the keyboard focus by clicking in "
|
||||
"it (but not for labels; see the takefocus option)."
|
||||
msgstr ""
|
|
@ -0,0 +1,21 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/faq/index.rst:5
|
||||
msgid "Python Frequently Asked Questions"
|
||||
msgstr ""
|
|
@ -0,0 +1,108 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/faq/installed.rst:3
|
||||
msgid "\"Why is Python Installed on my Computer?\" FAQ"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:6
|
||||
msgid "What is Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:8
|
||||
msgid ""
|
||||
"Python is a programming language. It's used for many different "
|
||||
"applications. It's used in some high schools and colleges as an introductory "
|
||||
"programming language because Python is easy to learn, but it's also used by "
|
||||
"professional software developers at places such as Google, NASA, and "
|
||||
"Lucasfilm Ltd."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:13
|
||||
msgid ""
|
||||
"If you wish to learn more about Python, start with the `Beginner's Guide to "
|
||||
"Python <https://wiki.python.org/moin/BeginnersGuide>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:18
|
||||
msgid "Why is Python installed on my machine?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:20
|
||||
msgid ""
|
||||
"If you find Python installed on your system but don't remember installing "
|
||||
"it, there are several possible ways it could have gotten there."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:23
|
||||
msgid ""
|
||||
"Perhaps another user on the computer wanted to learn programming and "
|
||||
"installed it; you'll have to figure out who's been using the machine and "
|
||||
"might have installed it."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:26
|
||||
msgid ""
|
||||
"A third-party application installed on the machine might have been written "
|
||||
"in Python and included a Python installation. There are many such "
|
||||
"applications, from GUI programs to network servers and administrative "
|
||||
"scripts."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:29
|
||||
msgid ""
|
||||
"Some Windows machines also have Python installed. At this writing we're "
|
||||
"aware of computers from Hewlett-Packard and Compaq that include Python. "
|
||||
"Apparently some of HP/Compaq's administrative tools are written in Python."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:32
|
||||
msgid ""
|
||||
"Many Unix-compatible operating systems, such as Mac OS X and some Linux "
|
||||
"distributions, have Python installed by default; it's included in the base "
|
||||
"installation."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:38
|
||||
msgid "Can I delete Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:40
|
||||
msgid "That depends on where Python came from."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:42
|
||||
msgid ""
|
||||
"If someone installed it deliberately, you can remove it without hurting "
|
||||
"anything. On Windows, use the Add/Remove Programs icon in the Control Panel."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:45
|
||||
msgid ""
|
||||
"If Python was installed by a third-party application, you can also remove "
|
||||
"it, but that application will no longer work. You should use that "
|
||||
"application's uninstaller rather than removing Python directly."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/installed.rst:49
|
||||
msgid ""
|
||||
"If Python came with your operating system, removing it is not recommended. "
|
||||
"If you remove it, whatever tools were written in Python will no longer run, "
|
||||
"and some of them might be important to you. Reinstalling the whole system "
|
||||
"would then be required to fix things again."
|
||||
msgstr ""
|
|
@ -0,0 +1,847 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/faq/library.rst:5
|
||||
msgid "Library and Extension FAQ"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:12
|
||||
msgid "General Library Questions"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:15
|
||||
msgid "How do I find a module or application to perform task X?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:17
|
||||
msgid ""
|
||||
"Check :ref:`the Library Reference <library-index>` to see if there's a "
|
||||
"relevant standard library module. (Eventually you'll learn what's in the "
|
||||
"standard library and will be able to skip this step.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:21
|
||||
msgid ""
|
||||
"For third-party packages, search the `Python Package Index <https://pypi."
|
||||
"python.org/pypi>`_ or try `Google <https://www.google.com>`_ or another Web "
|
||||
"search engine. Searching for \"Python\" plus a keyword or two for your "
|
||||
"topic of interest will usually find something helpful."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:28
|
||||
msgid "Where is the math.py (socket.py, regex.py, etc.) source file?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:30
|
||||
msgid ""
|
||||
"If you can't find a source file for a module it may be a built-in or "
|
||||
"dynamically loaded module implemented in C, C++ or other compiled language. "
|
||||
"In this case you may not have the source file or it may be something like :"
|
||||
"file:`mathmodule.c`, somewhere in a C source directory (not on the Python "
|
||||
"Path)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:35
|
||||
msgid "There are (at least) three kinds of modules in Python:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:37
|
||||
msgid "modules written in Python (.py);"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:38
|
||||
msgid ""
|
||||
"modules written in C and dynamically loaded (.dll, .pyd, .so, .sl, etc);"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:39
|
||||
msgid ""
|
||||
"modules written in C and linked with the interpreter; to get a list of "
|
||||
"these, type::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:47
|
||||
msgid "How do I make a Python script executable on Unix?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:49
|
||||
msgid ""
|
||||
"You need to do two things: the script file's mode must be executable and the "
|
||||
"first line must begin with ``#!`` followed by the path of the Python "
|
||||
"interpreter."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:53
|
||||
msgid ""
|
||||
"The first is done by executing ``chmod +x scriptfile`` or perhaps ``chmod "
|
||||
"755 scriptfile``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:56
|
||||
msgid ""
|
||||
"The second can be done in a number of ways. The most straightforward way is "
|
||||
"to write ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:61
|
||||
msgid ""
|
||||
"as the very first line of your file, using the pathname for where the Python "
|
||||
"interpreter is installed on your platform."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:64
|
||||
msgid ""
|
||||
"If you would like the script to be independent of where the Python "
|
||||
"interpreter lives, you can use the :program:`env` program. Almost all Unix "
|
||||
"variants support the following, assuming the Python interpreter is in a "
|
||||
"directory on the user's :envvar:`PATH`::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:71
|
||||
msgid ""
|
||||
"*Don't* do this for CGI scripts. The :envvar:`PATH` variable for CGI "
|
||||
"scripts is often very minimal, so you need to use the actual absolute "
|
||||
"pathname of the interpreter."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:75
|
||||
msgid ""
|
||||
"Occasionally, a user's environment is so full that the :program:`/usr/bin/"
|
||||
"env` program fails; or there's no env program at all. In that case, you can "
|
||||
"try the following hack (due to Alex Rezinsky)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:84
|
||||
msgid ""
|
||||
"The minor disadvantage is that this defines the script's __doc__ string. "
|
||||
"However, you can fix that by adding ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:92
|
||||
msgid "Is there a curses/termcap package for Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:96
|
||||
msgid ""
|
||||
"For Unix variants: The standard Python source distribution comes with a "
|
||||
"curses module in the :source:`Modules` subdirectory, though it's not "
|
||||
"compiled by default. (Note that this is not available in the Windows "
|
||||
"distribution -- there is no curses module for Windows.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:101
|
||||
msgid ""
|
||||
"The :mod:`curses` module supports basic curses features as well as many "
|
||||
"additional functions from ncurses and SYSV curses such as colour, "
|
||||
"alternative character set support, pads, and mouse support. This means the "
|
||||
"module isn't compatible with operating systems that only have BSD curses, "
|
||||
"but there don't seem to be any currently maintained OSes that fall into this "
|
||||
"category."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:107
|
||||
msgid ""
|
||||
"For Windows: use `the consolelib module <http://effbot.org/zone/console-"
|
||||
"index.htm>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:112
|
||||
msgid "Is there an equivalent to C's onexit() in Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:114
|
||||
msgid ""
|
||||
"The :mod:`atexit` module provides a register function that is similar to "
|
||||
"C's :c:func:`onexit`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:119
|
||||
msgid "Why don't my signal handlers work?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:121
|
||||
msgid ""
|
||||
"The most common problem is that the signal handler is declared with the "
|
||||
"wrong argument list. It is called as ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:126
|
||||
msgid "so it should be declared with two arguments::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:133
|
||||
msgid "Common tasks"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:136
|
||||
msgid "How do I test a Python program or component?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:138
|
||||
msgid ""
|
||||
"Python comes with two testing frameworks. The :mod:`doctest` module finds "
|
||||
"examples in the docstrings for a module and runs them, comparing the output "
|
||||
"with the expected output given in the docstring."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:142
|
||||
msgid ""
|
||||
"The :mod:`unittest` module is a fancier testing framework modelled on Java "
|
||||
"and Smalltalk testing frameworks."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:145
|
||||
msgid ""
|
||||
"To make testing easier, you should use good modular design in your program. "
|
||||
"Your program should have almost all functionality encapsulated in either "
|
||||
"functions or class methods -- and this sometimes has the surprising and "
|
||||
"delightful effect of making the program run faster (because local variable "
|
||||
"accesses are faster than global accesses). Furthermore the program should "
|
||||
"avoid depending on mutating global variables, since this makes testing much "
|
||||
"more difficult to do."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:153
|
||||
msgid "The \"global main logic\" of your program may be as simple as ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:158
|
||||
msgid "at the bottom of the main module of your program."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:160
|
||||
msgid ""
|
||||
"Once your program is organized as a tractable collection of functions and "
|
||||
"class behaviours you should write test functions that exercise the "
|
||||
"behaviours. A test suite that automates a sequence of tests can be "
|
||||
"associated with each module. This sounds like a lot of work, but since "
|
||||
"Python is so terse and flexible it's surprisingly easy. You can make coding "
|
||||
"much more pleasant and fun by writing your test functions in parallel with "
|
||||
"the \"production code\", since this makes it easy to find bugs and even "
|
||||
"design flaws earlier."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:168
|
||||
msgid ""
|
||||
"\"Support modules\" that are not intended to be the main module of a program "
|
||||
"may include a self-test of the module. ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:174
|
||||
msgid ""
|
||||
"Even programs that interact with complex external interfaces may be tested "
|
||||
"when the external interfaces are unavailable by using \"fake\" interfaces "
|
||||
"implemented in Python."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:180
|
||||
msgid "How do I create documentation from doc strings?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:182
|
||||
msgid ""
|
||||
"The :mod:`pydoc` module can create HTML from the doc strings in your Python "
|
||||
"source code. An alternative for creating API documentation purely from "
|
||||
"docstrings is `epydoc <http://epydoc.sourceforge.net/>`_. `Sphinx <http://"
|
||||
"sphinx-doc.org>`_ can also include docstring content."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:189
|
||||
msgid "How do I get a single keypress at a time?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:191
|
||||
msgid ""
|
||||
"For Unix variants there are several solutions. It's straightforward to do "
|
||||
"this using curses, but curses is a fairly large module to learn."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:235
|
||||
msgid "Threads"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:238
|
||||
msgid "How do I program using threads?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:240
|
||||
msgid ""
|
||||
"Be sure to use the :mod:`threading` module and not the :mod:`_thread` "
|
||||
"module. The :mod:`threading` module builds convenient abstractions on top of "
|
||||
"the low-level primitives provided by the :mod:`_thread` module."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:244
|
||||
msgid ""
|
||||
"Aahz has a set of slides from his threading tutorial that are helpful; see "
|
||||
"http://www.pythoncraft.com/OSCON2001/."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:249
|
||||
msgid "None of my threads seem to run: why?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:251
|
||||
msgid ""
|
||||
"As soon as the main thread exits, all threads are killed. Your main thread "
|
||||
"is running too quickly, giving the threads no time to do any work."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:254
|
||||
msgid ""
|
||||
"A simple fix is to add a sleep to the end of the program that's long enough "
|
||||
"for all the threads to finish::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:269
|
||||
msgid ""
|
||||
"But now (on many platforms) the threads don't run in parallel, but appear to "
|
||||
"run sequentially, one at a time! The reason is that the OS thread scheduler "
|
||||
"doesn't start a new thread until the previous thread is blocked."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:273
|
||||
msgid "A simple fix is to add a tiny sleep to the start of the run function::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:286
|
||||
msgid ""
|
||||
"Instead of trying to guess a good delay value for :func:`time.sleep`, it's "
|
||||
"better to use some kind of semaphore mechanism. One idea is to use the :mod:"
|
||||
"`queue` module to create a queue object, let each thread append a token to "
|
||||
"the queue when it finishes, and let the main thread read as many tokens from "
|
||||
"the queue as there are threads."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:294
|
||||
msgid "How do I parcel out work among a bunch of worker threads?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:296
|
||||
msgid ""
|
||||
"The easiest way is to use the new :mod:`concurrent.futures` module, "
|
||||
"especially the :mod:`~concurrent.futures.ThreadPoolExecutor` class."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:299
|
||||
msgid ""
|
||||
"Or, if you want fine control over the dispatching algorithm, you can write "
|
||||
"your own logic manually. Use the :mod:`queue` module to create a queue "
|
||||
"containing a list of jobs. The :class:`~queue.Queue` class maintains a list "
|
||||
"of objects and has a ``.put(obj)`` method that adds items to the queue and a "
|
||||
"``.get()`` method to return them. The class will take care of the locking "
|
||||
"necessary to ensure that each job is handed out exactly once."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:306
|
||||
msgid "Here's a trivial example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:344
|
||||
msgid "When run, this will produce the following output:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:362
|
||||
msgid ""
|
||||
"Consult the module's documentation for more details; the :class:`~queue."
|
||||
"Queue` class provides a featureful interface."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:367
|
||||
msgid "What kinds of global value mutation are thread-safe?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:369
|
||||
msgid ""
|
||||
"A :term:`global interpreter lock` (GIL) is used internally to ensure that "
|
||||
"only one thread runs in the Python VM at a time. In general, Python offers "
|
||||
"to switch among threads only between bytecode instructions; how frequently "
|
||||
"it switches can be set via :func:`sys.setswitchinterval`. Each bytecode "
|
||||
"instruction and therefore all the C implementation code reached from each "
|
||||
"instruction is therefore atomic from the point of view of a Python program."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:376
|
||||
msgid ""
|
||||
"In theory, this means an exact accounting requires an exact understanding of "
|
||||
"the PVM bytecode implementation. In practice, it means that operations on "
|
||||
"shared variables of built-in data types (ints, lists, dicts, etc) that "
|
||||
"\"look atomic\" really are."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:381
|
||||
msgid ""
|
||||
"For example, the following operations are all atomic (L, L1, L2 are lists, "
|
||||
"D, D1, D2 are dicts, x, y are objects, i, j are ints)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:396
|
||||
msgid "These aren't::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:403
|
||||
msgid ""
|
||||
"Operations that replace other objects may invoke those other objects' :meth:"
|
||||
"`__del__` method when their reference count reaches zero, and that can "
|
||||
"affect things. This is especially true for the mass updates to dictionaries "
|
||||
"and lists. When in doubt, use a mutex!"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:410
|
||||
msgid "Can't we get rid of the Global Interpreter Lock?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:414
|
||||
msgid ""
|
||||
"The :term:`global interpreter lock` (GIL) is often seen as a hindrance to "
|
||||
"Python's deployment on high-end multiprocessor server machines, because a "
|
||||
"multi-threaded Python program effectively only uses one CPU, due to the "
|
||||
"insistence that (almost) all Python code can only run while the GIL is held."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:419
|
||||
msgid ""
|
||||
"Back in the days of Python 1.5, Greg Stein actually implemented a "
|
||||
"comprehensive patch set (the \"free threading\" patches) that removed the "
|
||||
"GIL and replaced it with fine-grained locking. Adam Olsen recently did a "
|
||||
"similar experiment in his `python-safethread <http://code.google.com/p/"
|
||||
"python-safethread/>`_ project. Unfortunately, both experiments exhibited a "
|
||||
"sharp drop in single-thread performance (at least 30% slower), due to the "
|
||||
"amount of fine-grained locking necessary to compensate for the removal of "
|
||||
"the GIL."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:427
|
||||
msgid ""
|
||||
"This doesn't mean that you can't make good use of Python on multi-CPU "
|
||||
"machines! You just have to be creative with dividing the work up between "
|
||||
"multiple *processes* rather than multiple *threads*. The :class:"
|
||||
"`~concurrent.futures.ProcessPoolExecutor` class in the new :mod:`concurrent."
|
||||
"futures` module provides an easy way of doing so; the :mod:`multiprocessing` "
|
||||
"module provides a lower-level API in case you want more control over "
|
||||
"dispatching of tasks."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:435
|
||||
msgid ""
|
||||
"Judicious use of C extensions will also help; if you use a C extension to "
|
||||
"perform a time-consuming task, the extension can release the GIL while the "
|
||||
"thread of execution is in the C code and allow other threads to get some "
|
||||
"work done. Some standard library modules such as :mod:`zlib` and :mod:"
|
||||
"`hashlib` already do this."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:441
|
||||
msgid ""
|
||||
"It has been suggested that the GIL should be a per-interpreter-state lock "
|
||||
"rather than truly global; interpreters then wouldn't be able to share "
|
||||
"objects. Unfortunately, this isn't likely to happen either. It would be a "
|
||||
"tremendous amount of work, because many object implementations currently "
|
||||
"have global state. For example, small integers and short strings are cached; "
|
||||
"these caches would have to be moved to the interpreter state. Other object "
|
||||
"types have their own free list; these free lists would have to be moved to "
|
||||
"the interpreter state. And so on."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:450
|
||||
msgid ""
|
||||
"And I doubt that it can even be done in finite time, because the same "
|
||||
"problem exists for 3rd party extensions. It is likely that 3rd party "
|
||||
"extensions are being written at a faster rate than you can convert them to "
|
||||
"store all their global state in the interpreter state."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:455
|
||||
msgid ""
|
||||
"And finally, once you have multiple interpreters not sharing any state, what "
|
||||
"have you gained over running each interpreter in a separate process?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:460
|
||||
msgid "Input and Output"
|
||||
msgstr "Les entrées/sorties"
|
||||
|
||||
#: ../Doc/faq/library.rst:463
|
||||
msgid "How do I delete a file? (And other file questions...)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:465
|
||||
msgid ""
|
||||
"Use ``os.remove(filename)`` or ``os.unlink(filename)``; for documentation, "
|
||||
"see the :mod:`os` module. The two functions are identical; :func:`~os."
|
||||
"unlink` is simply the name of the Unix system call for this function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:469
|
||||
msgid ""
|
||||
"To remove a directory, use :func:`os.rmdir`; use :func:`os.mkdir` to create "
|
||||
"one. ``os.makedirs(path)`` will create any intermediate directories in "
|
||||
"``path`` that don't exist. ``os.removedirs(path)`` will remove intermediate "
|
||||
"directories as long as they're empty; if you want to delete an entire "
|
||||
"directory tree and its contents, use :func:`shutil.rmtree`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:475
|
||||
msgid "To rename a file, use ``os.rename(old_path, new_path)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:477
|
||||
msgid ""
|
||||
"To truncate a file, open it using ``f = open(filename, \"rb+\")``, and use "
|
||||
"``f.truncate(offset)``; offset defaults to the current seek position. "
|
||||
"There's also ``os.ftruncate(fd, offset)`` for files opened with :func:`os."
|
||||
"open`, where *fd* is the file descriptor (a small integer)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:482
|
||||
msgid ""
|
||||
"The :mod:`shutil` module also contains a number of functions to work on "
|
||||
"files including :func:`~shutil.copyfile`, :func:`~shutil.copytree`, and :"
|
||||
"func:`~shutil.rmtree`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:488
|
||||
msgid "How do I copy a file?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:490
|
||||
msgid ""
|
||||
"The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. Note "
|
||||
"that on MacOS 9 it doesn't copy the resource fork and Finder info."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:495
|
||||
msgid "How do I read (or write) binary data?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:497
|
||||
msgid ""
|
||||
"To read or write complex binary data formats, it's best to use the :mod:"
|
||||
"`struct` module. It allows you to take a string containing binary data "
|
||||
"(usually numbers) and convert it to Python objects; and vice versa."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:501
|
||||
msgid ""
|
||||
"For example, the following code reads two 2-byte integers and one 4-byte "
|
||||
"integer in big-endian format from a file::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:510
|
||||
msgid ""
|
||||
"The '>' in the format string forces big-endian data; the letter 'h' reads "
|
||||
"one \"short integer\" (2 bytes), and 'l' reads one \"long integer\" (4 "
|
||||
"bytes) from the string."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:514
|
||||
msgid ""
|
||||
"For data that is more regular (e.g. a homogeneous list of ints or floats), "
|
||||
"you can also use the :mod:`array` module."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:519
|
||||
msgid ""
|
||||
"To read and write binary data, it is mandatory to open the file in binary "
|
||||
"mode (here, passing ``\"rb\"`` to :func:`open`). If you use ``\"r\"`` "
|
||||
"instead (the default), the file will be open in text mode and ``f.read()`` "
|
||||
"will return :class:`str` objects rather than :class:`bytes` objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:527
|
||||
msgid "I can't seem to use os.read() on a pipe created with os.popen(); why?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:529
|
||||
msgid ""
|
||||
":func:`os.read` is a low-level function which takes a file descriptor, a "
|
||||
"small integer representing the opened file. :func:`os.popen` creates a high-"
|
||||
"level file object, the same type returned by the built-in :func:`open` "
|
||||
"function. Thus, to read *n* bytes from a pipe *p* created with :func:`os."
|
||||
"popen`, you need to use ``p.read(n)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:616
|
||||
msgid "How do I access the serial (RS232) port?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:618
|
||||
msgid "For Win32, POSIX (Linux, BSD, etc.), Jython:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:620
|
||||
msgid "http://pyserial.sourceforge.net"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:622
|
||||
msgid "For Unix, see a Usenet post by Mitch Chapman:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:624
|
||||
msgid "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:628
|
||||
msgid "Why doesn't closing sys.stdout (stdin, stderr) really close it?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:630
|
||||
msgid ""
|
||||
"Python :term:`file objects <file object>` are a high-level layer of "
|
||||
"abstraction on low-level C file descriptors."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:633
|
||||
msgid ""
|
||||
"For most file objects you create in Python via the built-in :func:`open` "
|
||||
"function, ``f.close()`` marks the Python file object as being closed from "
|
||||
"Python's point of view, and also arranges to close the underlying C file "
|
||||
"descriptor. This also happens automatically in ``f``'s destructor, when "
|
||||
"``f`` becomes garbage."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:639
|
||||
msgid ""
|
||||
"But stdin, stdout and stderr are treated specially by Python, because of the "
|
||||
"special status also given to them by C. Running ``sys.stdout.close()`` "
|
||||
"marks the Python-level file object as being closed, but does *not* close the "
|
||||
"associated C file descriptor."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:644
|
||||
msgid ""
|
||||
"To close the underlying C file descriptor for one of these three, you should "
|
||||
"first be sure that's what you really want to do (e.g., you may confuse "
|
||||
"extension modules trying to do I/O). If it is, use :func:`os.close`::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:652
|
||||
msgid "Or you can use the numeric constants 0, 1 and 2, respectively."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:656
|
||||
msgid "Network/Internet Programming"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:659
|
||||
msgid "What WWW tools are there for Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:661
|
||||
msgid ""
|
||||
"See the chapters titled :ref:`internet` and :ref:`netdata` in the Library "
|
||||
"Reference Manual. Python has many modules that will help you build server-"
|
||||
"side and client-side web systems."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:667
|
||||
msgid ""
|
||||
"A summary of available frameworks is maintained by Paul Boddie at https://"
|
||||
"wiki.python.org/moin/WebProgramming\\ ."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:670
|
||||
msgid ""
|
||||
"Cameron Laird maintains a useful set of pages about Python web technologies "
|
||||
"at http://phaseit.net/claird/comp.lang.python/web_python."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:675
|
||||
msgid "How can I mimic CGI form submission (METHOD=POST)?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:677
|
||||
msgid ""
|
||||
"I would like to retrieve web pages that are the result of POSTing a form. Is "
|
||||
"there existing code that would let me do this easily?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:680
|
||||
msgid "Yes. Here's a simple example that uses urllib.request::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:695
|
||||
msgid ""
|
||||
"Note that in general for percent-encoded POST operations, query strings must "
|
||||
"be quoted using :func:`urllib.parse.urlencode`. For example, to send "
|
||||
"``name=Guy Steele, Jr.``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:703
|
||||
msgid ":ref:`urllib-howto` for extensive examples."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:707
|
||||
msgid "What module should I use to help with generating HTML?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:711
|
||||
msgid ""
|
||||
"You can find a collection of useful links on the `Web Programming wiki page "
|
||||
"<https://wiki.python.org/moin/WebProgramming>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:716
|
||||
msgid "How do I send mail from a Python script?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:718
|
||||
msgid "Use the standard library module :mod:`smtplib`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:720
|
||||
msgid ""
|
||||
"Here's a very simple interactive mail sender that uses it. This method will "
|
||||
"work on any host that supports an SMTP listener. ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:740
|
||||
msgid ""
|
||||
"A Unix-only alternative uses sendmail. The location of the sendmail program "
|
||||
"varies between systems; sometimes it is ``/usr/lib/sendmail``, sometimes ``/"
|
||||
"usr/sbin/sendmail``. The sendmail manual page will help you out. Here's "
|
||||
"some sample code::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:760
|
||||
msgid "How do I avoid blocking in the connect() method of a socket?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:762
|
||||
msgid ""
|
||||
"The :mod:`select` module is commonly used to help with asynchronous I/O on "
|
||||
"sockets."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:765
|
||||
msgid ""
|
||||
"To prevent the TCP connect from blocking, you can set the socket to non-"
|
||||
"blocking mode. Then when you do the ``connect()``, you will either connect "
|
||||
"immediately (unlikely) or get an exception that contains the error number as "
|
||||
"``.errno``. ``errno.EINPROGRESS`` indicates that the connection is in "
|
||||
"progress, but hasn't finished yet. Different OSes will return different "
|
||||
"values, so you're going to have to check what's returned on your system."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:772
|
||||
msgid ""
|
||||
"You can use the ``connect_ex()`` method to avoid creating an exception. It "
|
||||
"will just return the errno value. To poll, you can call ``connect_ex()`` "
|
||||
"again later -- ``0`` or ``errno.EISCONN`` indicate that you're connected -- "
|
||||
"or you can pass this socket to select to check if it's writable."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:778
|
||||
msgid ""
|
||||
"The :mod:`asyncore` module presents a framework-like approach to the problem "
|
||||
"of writing non-blocking networking code. The third-party `Twisted <https://"
|
||||
"twistedmatrix.com/trac/>`_ library is a popular and feature-rich alternative."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:785
|
||||
msgid "Databases"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:788
|
||||
msgid "Are there any interfaces to database packages in Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:790
|
||||
msgid "Yes."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:792
|
||||
msgid ""
|
||||
"Interfaces to disk-based hashes such as :mod:`DBM <dbm.ndbm>` and :mod:`GDBM "
|
||||
"<dbm.gnu>` are also included with standard Python. There is also the :mod:"
|
||||
"`sqlite3` module, which provides a lightweight disk-based relational "
|
||||
"database."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:797
|
||||
msgid ""
|
||||
"Support for most relational databases is available. See the "
|
||||
"`DatabaseProgramming wiki page <https://wiki.python.org/moin/"
|
||||
"DatabaseProgramming>`_ for details."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:803
|
||||
msgid "How do you implement persistent objects in Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:805
|
||||
msgid ""
|
||||
"The :mod:`pickle` library module solves this in a very general way (though "
|
||||
"you still can't store things like open files, sockets or windows), and the :"
|
||||
"mod:`shelve` library module uses pickle and (g)dbm to create persistent "
|
||||
"mappings containing arbitrary Python objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:812
|
||||
msgid "Mathematics and Numerics"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:815
|
||||
msgid "How do I generate random numbers in Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:817
|
||||
msgid ""
|
||||
"The standard module :mod:`random` implements a random number generator. "
|
||||
"Usage is simple::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:823
|
||||
msgid "This returns a random floating point number in the range [0, 1)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:825
|
||||
msgid ""
|
||||
"There are also many other specialized generators in this module, such as:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:827
|
||||
msgid "``randrange(a, b)`` chooses an integer in the range [a, b)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:828
|
||||
msgid "``uniform(a, b)`` chooses a floating point number in the range [a, b)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:829
|
||||
msgid ""
|
||||
"``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:831
|
||||
msgid "Some higher-level functions operate on sequences directly, such as:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:833
|
||||
msgid "``choice(S)`` chooses random element from a given sequence"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:834
|
||||
msgid "``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/library.rst:836
|
||||
msgid ""
|
||||
"There's also a ``Random`` class you can instantiate to create independent "
|
||||
"multiple random number generators."
|
||||
msgstr ""
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,448 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/faq/windows.rst:7
|
||||
msgid "Python on Windows FAQ"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:18
|
||||
msgid "How do I run a Python program under Windows?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:20
|
||||
msgid ""
|
||||
"This is not necessarily a straightforward question. If you are already "
|
||||
"familiar with running programs from the Windows command line then everything "
|
||||
"will seem obvious; otherwise, you might need a little more guidance."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:0
|
||||
msgid "|Python Development on XP|_"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:27
|
||||
msgid ""
|
||||
"This series of screencasts aims to get you up and running with Python on "
|
||||
"Windows XP. The knowledge is distilled into 1.5 hours and will get you up "
|
||||
"and running with the right Python distribution, coding in your choice of "
|
||||
"IDE, and debugging and writing solid code with unit-tests."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:36
|
||||
msgid ""
|
||||
"Unless you use some sort of integrated development environment, you will end "
|
||||
"up *typing* Windows commands into what is variously referred to as a \"DOS "
|
||||
"window\" or \"Command prompt window\". Usually you can create such a window "
|
||||
"from your Start menu; under Windows 7 the menu selection is :menuselection:"
|
||||
"`Start --> Programs --> Accessories --> Command Prompt`. You should be able "
|
||||
"to recognize when you have started such a window because you will see a "
|
||||
"Windows \"command prompt\", which usually looks like this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:46
|
||||
msgid ""
|
||||
"The letter may be different, and there might be other things after it, so "
|
||||
"you might just as easily see something like::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:51
|
||||
msgid ""
|
||||
"depending on how your computer has been set up and what else you have "
|
||||
"recently done with it. Once you have started such a window, you are well on "
|
||||
"the way to running Python programs."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:55
|
||||
msgid ""
|
||||
"You need to realize that your Python scripts have to be processed by another "
|
||||
"program called the Python *interpreter*. The interpreter reads your script, "
|
||||
"compiles it into bytecodes, and then executes the bytecodes to run your "
|
||||
"program. So, how do you arrange for the interpreter to handle your Python?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:60
|
||||
msgid ""
|
||||
"First, you need to make sure that your command window recognises the word "
|
||||
"\"python\" as an instruction to start the interpreter. If you have opened a "
|
||||
"command window, you should try entering the command ``python`` and hitting "
|
||||
"return.::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:67
|
||||
msgid "You should then see something like::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:73
|
||||
msgid ""
|
||||
"You have started the interpreter in \"interactive mode\". That means you can "
|
||||
"enter Python statements or expressions interactively and have them executed "
|
||||
"or evaluated while you wait. This is one of Python's strongest features. "
|
||||
"Check it by entering a few expressions of your choice and seeing the "
|
||||
"results::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:83
|
||||
msgid ""
|
||||
"Many people use the interactive mode as a convenient yet highly programmable "
|
||||
"calculator. When you want to end your interactive Python session, hold the :"
|
||||
"kbd:`Ctrl` key down while you enter a :kbd:`Z`, then hit the \":kbd:`Enter`"
|
||||
"\" key to get back to your Windows command prompt."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:88
|
||||
msgid ""
|
||||
"You may also find that you have a Start-menu entry such as :menuselection:"
|
||||
"`Start --> Programs --> Python 3.3 --> Python (command line)` that results "
|
||||
"in you seeing the ``>>>`` prompt in a new window. If so, the window will "
|
||||
"disappear after you enter the :kbd:`Ctrl-Z` character; Windows is running a "
|
||||
"single \"python\" command in the window, and closes it when you terminate "
|
||||
"the interpreter."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:94
|
||||
msgid ""
|
||||
"If the ``python`` command, instead of displaying the interpreter prompt "
|
||||
"``>>>``, gives you a message like::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:0
|
||||
msgid "|Adding Python to DOS Path|_"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:102
|
||||
msgid ""
|
||||
"Python is not added to the DOS path by default. This screencast will walk "
|
||||
"you through the steps to add the correct entry to the `System Path`, "
|
||||
"allowing Python to be executed from the command-line by all users."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:111
|
||||
msgid "or::"
|
||||
msgstr "ou : ::"
|
||||
|
||||
#: ../Doc/faq/windows.rst:115
|
||||
msgid ""
|
||||
"then you need to make sure that your computer knows where to find the Python "
|
||||
"interpreter. To do this you will have to modify a setting called PATH, "
|
||||
"which is a list of directories where Windows will look for programs."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:119
|
||||
msgid ""
|
||||
"You should arrange for Python's installation directory to be added to the "
|
||||
"PATH of every command window as it starts. If you installed Python fairly "
|
||||
"recently then the command ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:125
|
||||
msgid ""
|
||||
"will probably tell you where it is installed; the usual location is "
|
||||
"something like ``C:\\Python33``. Otherwise you will be reduced to a search "
|
||||
"of your whole disk ... use :menuselection:`Tools --> Find` or hit the :"
|
||||
"guilabel:`Search` button and look for \"python.exe\". Supposing you "
|
||||
"discover that Python is installed in the ``C:\\Python33`` directory (the "
|
||||
"default at the time of writing), you should make sure that entering the "
|
||||
"command ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:134
|
||||
msgid ""
|
||||
"starts up the interpreter as above (and don't forget you'll need a \":kbd:"
|
||||
"`Ctrl-Z`\" and an \":kbd:`Enter`\" to get out of it). Once you have verified "
|
||||
"the directory, you can add it to the system path to make it easier to start "
|
||||
"Python by just running the ``python`` command. This is currently an option "
|
||||
"in the installer as of CPython 3.3."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:140
|
||||
msgid ""
|
||||
"More information about environment variables can be found on the :ref:`Using "
|
||||
"Python on Windows <setting-envvars>` page."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:144
|
||||
msgid "How do I make Python scripts executable?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:146
|
||||
msgid ""
|
||||
"On Windows, the standard Python installer already associates the .py "
|
||||
"extension with a file type (Python.File) and gives that file type an open "
|
||||
"command that runs the interpreter (``D:\\Program Files\\Python\\python.exe "
|
||||
"\"%1\" %*``). This is enough to make scripts executable from the command "
|
||||
"prompt as 'foo.py'. If you'd rather be able to execute the script by simple "
|
||||
"typing 'foo' with no extension you need to add .py to the PATHEXT "
|
||||
"environment variable."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:154
|
||||
msgid "Why does Python sometimes take so long to start?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:156
|
||||
msgid ""
|
||||
"Usually Python starts very quickly on Windows, but occasionally there are "
|
||||
"bug reports that Python suddenly begins to take a long time to start up. "
|
||||
"This is made even more puzzling because Python will work fine on other "
|
||||
"Windows systems which appear to be configured identically."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:161
|
||||
msgid ""
|
||||
"The problem may be caused by a misconfiguration of virus checking software "
|
||||
"on the problem machine. Some virus scanners have been known to introduce "
|
||||
"startup overhead of two orders of magnitude when the scanner is configured "
|
||||
"to monitor all reads from the filesystem. Try checking the configuration of "
|
||||
"virus scanning software on your systems to ensure that they are indeed "
|
||||
"configured identically. McAfee, when configured to scan all file system read "
|
||||
"activity, is a particular offender."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:171
|
||||
msgid "How do I make an executable from a Python script?"
|
||||
msgstr "Comment construire un exécutable depuis un script Python ?"
|
||||
|
||||
#: ../Doc/faq/windows.rst:173
|
||||
msgid ""
|
||||
"See http://cx-freeze.sourceforge.net/ for a distutils extension that allows "
|
||||
"you to create console and GUI executables from Python code. `py2exe <http://"
|
||||
"www.py2exe.org/>`_, the most popular extension for building Python 2.x-based "
|
||||
"executables, does not yet support Python 3 but a version that does is in "
|
||||
"development."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:181
|
||||
msgid "Is a ``*.pyd`` file the same as a DLL?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:183
|
||||
msgid ""
|
||||
"Yes, .pyd files are dll's, but there are a few differences. If you have a "
|
||||
"DLL named ``foo.pyd``, then it must have a function ``PyInit_foo()``. You "
|
||||
"can then write Python \"import foo\", and Python will search for foo.pyd (as "
|
||||
"well as foo.py, foo.pyc) and if it finds it, will attempt to call "
|
||||
"``PyInit_foo()`` to initialize it. You do not link your .exe with foo.lib, "
|
||||
"as that would cause Windows to require the DLL to be present."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:190
|
||||
msgid ""
|
||||
"Note that the search path for foo.pyd is PYTHONPATH, not the same as the "
|
||||
"path that Windows uses to search for foo.dll. Also, foo.pyd need not be "
|
||||
"present to run your program, whereas if you linked your program with a dll, "
|
||||
"the dll is required. Of course, foo.pyd is required if you want to say "
|
||||
"``import foo``. In a DLL, linkage is declared in the source code with "
|
||||
"``__declspec(dllexport)``. In a .pyd, linkage is defined in a list of "
|
||||
"available functions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:199
|
||||
msgid "How can I embed Python into a Windows application?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:201
|
||||
msgid ""
|
||||
"Embedding the Python interpreter in a Windows app can be summarized as "
|
||||
"follows:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:203
|
||||
msgid ""
|
||||
"Do _not_ build Python into your .exe file directly. On Windows, Python must "
|
||||
"be a DLL to handle importing modules that are themselves DLL's. (This is "
|
||||
"the first key undocumented fact.) Instead, link to :file:`python{NN}.dll`; "
|
||||
"it is typically installed in ``C:\\Windows\\System``. *NN* is the Python "
|
||||
"version, a number such as \"33\" for Python 3.3."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:209
|
||||
msgid ""
|
||||
"You can link to Python in two different ways. Load-time linking means "
|
||||
"linking against :file:`python{NN}.lib`, while run-time linking means linking "
|
||||
"against :file:`python{NN}.dll`. (General note: :file:`python{NN}.lib` is "
|
||||
"the so-called \"import lib\" corresponding to :file:`python{NN}.dll`. It "
|
||||
"merely defines symbols for the linker.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:215
|
||||
msgid ""
|
||||
"Run-time linking greatly simplifies link options; everything happens at run "
|
||||
"time. Your code must load :file:`python{NN}.dll` using the Windows "
|
||||
"``LoadLibraryEx()`` routine. The code must also use access routines and "
|
||||
"data in :file:`python{NN}.dll` (that is, Python's C API's) using pointers "
|
||||
"obtained by the Windows ``GetProcAddress()`` routine. Macros can make using "
|
||||
"these pointers transparent to any C code that calls routines in Python's C "
|
||||
"API."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:222
|
||||
msgid ""
|
||||
"Borland note: convert :file:`python{NN}.lib` to OMF format using Coff2Omf."
|
||||
"exe first."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:227
|
||||
msgid ""
|
||||
"If you use SWIG, it is easy to create a Python \"extension module\" that "
|
||||
"will make the app's data and methods available to Python. SWIG will handle "
|
||||
"just about all the grungy details for you. The result is C code that you "
|
||||
"link *into* your .exe file (!) You do _not_ have to create a DLL file, and "
|
||||
"this also simplifies linking."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:233
|
||||
msgid ""
|
||||
"SWIG will create an init function (a C function) whose name depends on the "
|
||||
"name of the extension module. For example, if the name of the module is "
|
||||
"leo, the init function will be called initleo(). If you use SWIG shadow "
|
||||
"classes, as you should, the init function will be called initleoc(). This "
|
||||
"initializes a mostly hidden helper class used by the shadow class."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:239
|
||||
msgid ""
|
||||
"The reason you can link the C code in step 2 into your .exe file is that "
|
||||
"calling the initialization function is equivalent to importing the module "
|
||||
"into Python! (This is the second key undocumented fact.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:243
|
||||
msgid ""
|
||||
"In short, you can use the following code to initialize the Python "
|
||||
"interpreter with your extension module."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:254
|
||||
msgid ""
|
||||
"There are two problems with Python's C API which will become apparent if you "
|
||||
"use a compiler other than MSVC, the compiler used to build pythonNN.dll."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:257
|
||||
msgid ""
|
||||
"Problem 1: The so-called \"Very High Level\" functions that take FILE * "
|
||||
"arguments will not work in a multi-compiler environment because each "
|
||||
"compiler's notion of a struct FILE will be different. From an "
|
||||
"implementation standpoint these are very _low_ level functions."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:262
|
||||
msgid ""
|
||||
"Problem 2: SWIG generates the following code when generating wrappers to "
|
||||
"void functions:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:271
|
||||
msgid ""
|
||||
"Alas, Py_None is a macro that expands to a reference to a complex data "
|
||||
"structure called _Py_NoneStruct inside pythonNN.dll. Again, this code will "
|
||||
"fail in a mult-compiler environment. Replace such code by:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:279
|
||||
msgid ""
|
||||
"It may be possible to use SWIG's ``%typemap`` command to make the change "
|
||||
"automatically, though I have not been able to get this to work (I'm a "
|
||||
"complete SWIG newbie)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:283
|
||||
msgid ""
|
||||
"Using a Python shell script to put up a Python interpreter window from "
|
||||
"inside your Windows app is not a good idea; the resulting window will be "
|
||||
"independent of your app's windowing system. Rather, you (or the "
|
||||
"wxPythonWindow class) should create a \"native\" interpreter window. It is "
|
||||
"easy to connect that window to the Python interpreter. You can redirect "
|
||||
"Python's i/o to _any_ object that supports read and write, so all you need "
|
||||
"is a Python object (defined in your extension module) that contains read() "
|
||||
"and write() methods."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:292
|
||||
msgid "How do I keep editors from inserting tabs into my Python source?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:294
|
||||
msgid ""
|
||||
"The FAQ does not recommend using tabs, and the Python style guide, :pep:`8`, "
|
||||
"recommends 4 spaces for distributed Python code; this is also the Emacs "
|
||||
"python-mode default."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:298
|
||||
msgid ""
|
||||
"Under any editor, mixing tabs and spaces is a bad idea. MSVC is no "
|
||||
"different in this respect, and is easily configured to use spaces: Take :"
|
||||
"menuselection:`Tools --> Options --> Tabs`, and for file type \"Default\" "
|
||||
"set \"Tab size\" and \"Indent size\" to 4, and select the \"Insert spaces\" "
|
||||
"radio button."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:303
|
||||
msgid ""
|
||||
"If you suspect mixed tabs and spaces are causing problems in leading "
|
||||
"whitespace, run Python with the :option:`-t` switch or run ``Tools/Scripts/"
|
||||
"tabnanny.py`` to check a directory tree in batch mode."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:309
|
||||
msgid "How do I check for a keypress without blocking?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:311
|
||||
msgid ""
|
||||
"Use the msvcrt module. This is a standard Windows-specific extension "
|
||||
"module. It defines a function ``kbhit()`` which checks whether a keyboard "
|
||||
"hit is present, and ``getch()`` which gets one character without echoing it."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:317
|
||||
msgid "How do I emulate os.kill() in Windows?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:319
|
||||
msgid ""
|
||||
"Prior to Python 2.7 and 3.2, to terminate a process, you can use :mod:"
|
||||
"`ctypes`::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:329
|
||||
msgid ""
|
||||
"In 2.7 and 3.2, :func:`os.kill` is implemented similar to the above "
|
||||
"function, with the additional feature of being able to send :kbd:`Ctrl+C` "
|
||||
"and :kbd:`Ctrl+Break` to console subprocesses which are designed to handle "
|
||||
"those signals. See :func:`os.kill` for further details."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:335
|
||||
msgid "How do I extract the downloaded documentation on Windows?"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:337
|
||||
msgid ""
|
||||
"Sometimes, when you download the documentation package to a Windows machine "
|
||||
"using a web browser, the file extension of the saved file ends up being ."
|
||||
"EXE. This is a mistake; the extension should be .TGZ."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/faq/windows.rst:341
|
||||
msgid ""
|
||||
"Simply rename the downloaded file to have the .TGZ extension, and WinZip "
|
||||
"will be able to handle it. (If your copy of WinZip doesn't, get a newer one "
|
||||
"from https://www.winzip.com.)"
|
||||
msgstr ""
|
19
glossary.po
19
glossary.po
|
@ -3,27 +3,26 @@
|
|||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-17 21:44+0200\n"
|
||||
"PO-Revision-Date: 2016-10-21 14:41+0100\n"
|
||||
"Last-Translator: Claire Revillet <grenoya@zarb.org>\n"
|
||||
"Language-Team: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.5.4\n"
|
||||
"Language: FR\n"
|
||||
|
||||
#: ../Doc/glossary.rst:5
|
||||
msgid "Glossary"
|
||||
msgstr "Glossaire"
|
||||
|
||||
#: ../Doc/glossary.rst:10
|
||||
msgid ">>>"
|
||||
msgstr ">>>"
|
||||
msgid "``>>>``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/glossary.rst:12
|
||||
msgid ""
|
||||
|
@ -35,8 +34,8 @@ msgstr ""
|
|||
"interactivement dans l'interpréteur."
|
||||
|
||||
#: ../Doc/glossary.rst:14
|
||||
msgid "..."
|
||||
msgstr "..."
|
||||
msgid "``...``"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/glossary.rst:16
|
||||
msgid ""
|
||||
|
|
|
@ -0,0 +1,484 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/howto/argparse.rst:3
|
||||
msgid "Argparse Tutorial"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:5
|
||||
msgid "Tshepang Lekhonkhobe"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:9
|
||||
msgid ""
|
||||
"This tutorial is intended to be a gentle introduction to :mod:`argparse`, "
|
||||
"the recommended command-line parsing module in the Python standard library."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:14
|
||||
msgid ""
|
||||
"There are two other modules that fulfill the same task, namely :mod:`getopt` "
|
||||
"(an equivalent for :c:func:`getopt` from the C language) and the deprecated :"
|
||||
"mod:`optparse`. Note also that :mod:`argparse` is based on :mod:`optparse`, "
|
||||
"and therefore very similar in terms of usage."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:22
|
||||
msgid "Concepts"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:24
|
||||
msgid ""
|
||||
"Let's show the sort of functionality that we are going to explore in this "
|
||||
"introductory tutorial by making use of the :command:`ls` command:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:46
|
||||
msgid "A few concepts we can learn from the four commands:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:48
|
||||
msgid ""
|
||||
"The :command:`ls` command is useful when run without any options at all. It "
|
||||
"defaults to displaying the contents of the current directory."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:51
|
||||
msgid ""
|
||||
"If we want beyond what it provides by default, we tell it a bit more. In "
|
||||
"this case, we want it to display a different directory, ``pypy``. What we "
|
||||
"did is specify what is known as a positional argument. It's named so because "
|
||||
"the program should know what to do with the value, solely based on where it "
|
||||
"appears on the command line. This concept is more relevant to a command "
|
||||
"like :command:`cp`, whose most basic usage is ``cp SRC DEST``. The first "
|
||||
"position is *what you want copied,* and the second position is *where you "
|
||||
"want it copied to*."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:60
|
||||
msgid ""
|
||||
"Now, say we want to change behaviour of the program. In our example, we "
|
||||
"display more info for each file instead of just showing the file names. The "
|
||||
"``-l`` in that case is known as an optional argument."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:64
|
||||
msgid ""
|
||||
"That's a snippet of the help text. It's very useful in that you can come "
|
||||
"across a program you have never used before, and can figure out how it works "
|
||||
"simply by reading its help text."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:70
|
||||
msgid "The basics"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:72
|
||||
msgid "Let us start with a very simple example which does (almost) nothing::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:78 ../Doc/howto/argparse.rst:186
|
||||
#: ../Doc/howto/argparse.rst:207
|
||||
msgid "Following is a result of running the code:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:95 ../Doc/howto/argparse.rst:252
|
||||
#: ../Doc/howto/argparse.rst:296
|
||||
msgid "Here is what is happening:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:97
|
||||
msgid ""
|
||||
"Running the script without any options results in nothing displayed to "
|
||||
"stdout. Not so useful."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:100
|
||||
msgid ""
|
||||
"The second one starts to display the usefulness of the :mod:`argparse` "
|
||||
"module. We have done almost nothing, but already we get a nice help message."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:103
|
||||
msgid ""
|
||||
"The ``--help`` option, which can also be shortened to ``-h``, is the only "
|
||||
"option we get for free (i.e. no need to specify it). Specifying anything "
|
||||
"else results in an error. But even then, we do get a useful usage message, "
|
||||
"also for free."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:110
|
||||
msgid "Introducing Positional arguments"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:112
|
||||
msgid "An example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:120
|
||||
msgid "And running the code:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:138
|
||||
msgid "Here is what's happening:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:140
|
||||
msgid ""
|
||||
"We've added the :meth:`add_argument` method, which is what we use to specify "
|
||||
"which command-line options the program is willing to accept. In this case, "
|
||||
"I've named it ``echo`` so that it's in line with its function."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:144
|
||||
msgid "Calling our program now requires us to specify an option."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:146
|
||||
msgid ""
|
||||
"The :meth:`parse_args` method actually returns some data from the options "
|
||||
"specified, in this case, ``echo``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:149
|
||||
msgid ""
|
||||
"The variable is some form of 'magic' that :mod:`argparse` performs for free "
|
||||
"(i.e. no need to specify which variable that value is stored in). You will "
|
||||
"also notice that its name matches the string argument given to the method, "
|
||||
"``echo``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:154
|
||||
msgid ""
|
||||
"Note however that, although the help display looks nice and all, it "
|
||||
"currently is not as helpful as it can be. For example we see that we got "
|
||||
"``echo`` as a positional argument, but we don't know what it does, other "
|
||||
"than by guessing or by reading the source code. So, let's make it a bit more "
|
||||
"useful::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:165
|
||||
msgid "And we get:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:178
|
||||
msgid "Now, how about doing something even more useful::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:196
|
||||
msgid ""
|
||||
"That didn't go so well. That's because :mod:`argparse` treats the options we "
|
||||
"give it as strings, unless we tell it otherwise. So, let's tell :mod:"
|
||||
"`argparse` to treat that input as an integer::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:217
|
||||
msgid ""
|
||||
"That went well. The program now even helpfully quits on bad illegal input "
|
||||
"before proceeding."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:222
|
||||
msgid "Introducing Optional arguments"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:224
|
||||
msgid ""
|
||||
"So far we, have been playing with positional arguments. Let us have a look "
|
||||
"on how to add optional ones::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:234 ../Doc/howto/argparse.rst:280
|
||||
#: ../Doc/howto/argparse.rst:396 ../Doc/howto/argparse.rst:430
|
||||
msgid "And the output:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:254
|
||||
msgid ""
|
||||
"The program is written so as to display something when ``--verbosity`` is "
|
||||
"specified and display nothing when not."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:257
|
||||
msgid ""
|
||||
"To show that the option is actually optional, there is no error when running "
|
||||
"the program without it. Note that by default, if an optional argument isn't "
|
||||
"used, the relevant variable, in this case :attr:`args.verbosity`, is given "
|
||||
"``None`` as a value, which is the reason it fails the truth test of the :"
|
||||
"keyword:`if` statement."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:263
|
||||
msgid "The help message is a bit different."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:265
|
||||
msgid ""
|
||||
"When using the ``--verbosity`` option, one must also specify some value, any "
|
||||
"value."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:268
|
||||
msgid ""
|
||||
"The above example accepts arbitrary integer values for ``--verbosity``, but "
|
||||
"for our simple program, only two values are actually useful, ``True`` or "
|
||||
"``False``. Let's modify the code accordingly::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:298
|
||||
msgid ""
|
||||
"The option is now more of a flag than something that requires a value. We "
|
||||
"even changed the name of the option to match that idea. Note that we now "
|
||||
"specify a new keyword, ``action``, and give it the value ``\"store_true\"``. "
|
||||
"This means that, if the option is specified, assign the value ``True`` to :"
|
||||
"data:`args.verbose`. Not specifying it implies ``False``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:305
|
||||
msgid ""
|
||||
"It complains when you specify a value, in true spirit of what flags actually "
|
||||
"are."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:308
|
||||
msgid "Notice the different help text."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:312
|
||||
msgid "Short options"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:314
|
||||
msgid ""
|
||||
"If you are familiar with command line usage, you will notice that I haven't "
|
||||
"yet touched on the topic of short versions of the options. It's quite "
|
||||
"simple::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:326
|
||||
msgid "And here goes:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:339
|
||||
msgid "Note that the new ability is also reflected in the help text."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:343
|
||||
msgid "Combining Positional and Optional arguments"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:345
|
||||
msgid "Our program keeps growing in complexity::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:360
|
||||
msgid "And now the output:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:374
|
||||
msgid "We've brought back a positional argument, hence the complaint."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:376
|
||||
msgid "Note that the order does not matter."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:378
|
||||
msgid ""
|
||||
"How about we give this program of ours back the ability to have multiple "
|
||||
"verbosity values, and actually get to use them::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:412
|
||||
msgid ""
|
||||
"These all look good except the last one, which exposes a bug in our program. "
|
||||
"Let's fix it by restricting the values the ``--verbosity`` option can "
|
||||
"accept::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:448
|
||||
msgid ""
|
||||
"Note that the change also reflects both in the error message as well as the "
|
||||
"help string."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:451
|
||||
msgid ""
|
||||
"Now, let's use a different approach of playing with verbosity, which is "
|
||||
"pretty common. It also matches the way the CPython executable handles its "
|
||||
"own verbosity argument (check the output of ``python --help``)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:470
|
||||
msgid ""
|
||||
"We have introduced another action, \"count\", to count the number of "
|
||||
"occurrences of a specific optional arguments:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:498
|
||||
msgid ""
|
||||
"Yes, it's now more of a flag (similar to ``action=\"store_true\"``) in the "
|
||||
"previous version of our script. That should explain the complaint."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:501
|
||||
msgid "It also behaves similar to \"store_true\" action."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:503
|
||||
msgid ""
|
||||
"Now here's a demonstration of what the \"count\" action gives. You've "
|
||||
"probably seen this sort of usage before."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:506
|
||||
msgid ""
|
||||
"And if you don't specify the ``-v`` flag, that flag is considered to have "
|
||||
"``None`` value."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:509
|
||||
msgid ""
|
||||
"As should be expected, specifying the long form of the flag, we should get "
|
||||
"the same output."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:512
|
||||
msgid ""
|
||||
"Sadly, our help output isn't very informative on the new ability our script "
|
||||
"has acquired, but that can always be fixed by improving the documentation "
|
||||
"for our script (e.g. via the ``help`` keyword argument)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:516
|
||||
msgid "That last output exposes a bug in our program."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:519
|
||||
msgid "Let's fix::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:538
|
||||
msgid "And this is what it gives:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:553
|
||||
msgid ""
|
||||
"First output went well, and fixes the bug we had before. That is, we want "
|
||||
"any value >= 2 to be as verbose as possible."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:556
|
||||
msgid "Third output not so good."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:558
|
||||
msgid "Let's fix that bug::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:575
|
||||
msgid ""
|
||||
"We've just introduced yet another keyword, ``default``. We've set it to "
|
||||
"``0`` in order to make it comparable to the other int values. Remember that "
|
||||
"by default, if an optional argument isn't specified, it gets the ``None`` "
|
||||
"value, and that cannot be compared to an int value (hence the :exc:"
|
||||
"`TypeError` exception)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:582
|
||||
msgid "And:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:589
|
||||
msgid ""
|
||||
"You can go quite far just with what we've learned so far, and we have only "
|
||||
"scratched the surface. The :mod:`argparse` module is very powerful, and "
|
||||
"we'll explore a bit more of it before we end this tutorial."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:596
|
||||
msgid "Getting a little more advanced"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:598
|
||||
msgid ""
|
||||
"What if we wanted to expand our tiny program to perform other powers, not "
|
||||
"just squares::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:615 ../Doc/howto/argparse.rst:653
|
||||
msgid "Output:"
|
||||
msgstr "Sortie :"
|
||||
|
||||
#: ../Doc/howto/argparse.rst:636
|
||||
msgid ""
|
||||
"Notice that so far we've been using verbosity level to *change* the text "
|
||||
"that gets displayed. The following example instead uses verbosity level to "
|
||||
"display *more* text instead::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:667
|
||||
msgid "Conflicting options"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:669
|
||||
msgid ""
|
||||
"So far, we have been working with two methods of an :class:`argparse."
|
||||
"ArgumentParser` instance. Let's introduce a third one, :meth:"
|
||||
"`add_mutually_exclusive_group`. It allows for us to specify options that "
|
||||
"conflict with each other. Let's also change the rest of the program so that "
|
||||
"the new functionality makes more sense: we'll introduce the ``--quiet`` "
|
||||
"option, which will be the opposite of the ``--verbose`` one::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:695
|
||||
msgid ""
|
||||
"Our program is now simpler, and we've lost some functionality for the sake "
|
||||
"of demonstration. Anyways, here's the output:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:713
|
||||
msgid ""
|
||||
"That should be easy to follow. I've added that last output so you can see "
|
||||
"the sort of flexibility you get, i.e. mixing long form options with short "
|
||||
"form ones."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:717
|
||||
msgid ""
|
||||
"Before we conclude, you probably want to tell your users the main purpose of "
|
||||
"your program, just in case they don't know::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:738
|
||||
msgid ""
|
||||
"Note that slight difference in the usage text. Note the ``[-v | -q]``, which "
|
||||
"tells us that we can either use ``-v`` or ``-q``, but not both at the same "
|
||||
"time:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:760
|
||||
msgid "Conclusion"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/argparse.rst:762
|
||||
msgid ""
|
||||
"The :mod:`argparse` module offers a lot more than shown here. Its docs are "
|
||||
"quite detailed and thorough, and full of examples. Having gone through this "
|
||||
"tutorial, you should easily digest them without feeling overwhelmed."
|
||||
msgstr ""
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,191 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2001-2016, Python Software Foundation
|
||||
# This file is distributed under the same license as the Python package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-10-30 10:40+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../Doc/howto/cporting.rst:7
|
||||
msgid "Porting Extension Modules to Python 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:9
|
||||
msgid "Benjamin Peterson"
|
||||
msgstr "Benjamin Peterson"
|
||||
|
||||
#: ../Doc/howto/cporting.rst:0
|
||||
msgid "Abstract"
|
||||
msgstr "Résumé"
|
||||
|
||||
#: ../Doc/howto/cporting.rst:14
|
||||
msgid ""
|
||||
"Although changing the C-API was not one of Python 3's objectives, the many "
|
||||
"Python-level changes made leaving Python 2's API intact impossible. In "
|
||||
"fact, some changes such as :func:`int` and :func:`long` unification are more "
|
||||
"obvious on the C level. This document endeavors to document "
|
||||
"incompatibilities and how they can be worked around."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:23
|
||||
msgid "Conditional compilation"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:25
|
||||
msgid ""
|
||||
"The easiest way to compile only some code for Python 3 is to check if :c:"
|
||||
"macro:`PY_MAJOR_VERSION` is greater than or equal to 3. ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:32
|
||||
msgid ""
|
||||
"API functions that are not present can be aliased to their equivalents "
|
||||
"within conditional blocks."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:37
|
||||
msgid "Changes to Object APIs"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:39
|
||||
msgid ""
|
||||
"Python 3 merged together some types with similar functions while cleanly "
|
||||
"separating others."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:44
|
||||
msgid "str/unicode Unification"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:46
|
||||
msgid ""
|
||||
"Python 3's :func:`str` type is equivalent to Python 2's :func:`unicode`; the "
|
||||
"C functions are called ``PyUnicode_*`` for both. The old 8-bit string type "
|
||||
"has become :func:`bytes`, with C functions called ``PyBytes_*``. Python 2.6 "
|
||||
"and later provide a compatibility header, :file:`bytesobject.h`, mapping "
|
||||
"``PyBytes`` names to ``PyString`` ones. For best compatibility with Python "
|
||||
"3, :c:type:`PyUnicode` should be used for textual data and :c:type:`PyBytes` "
|
||||
"for binary data. It's also important to remember that :c:type:`PyBytes` "
|
||||
"and :c:type:`PyUnicode` in Python 3 are not interchangeable like :c:type:"
|
||||
"`PyString` and :c:type:`PyUnicode` are in Python 2. The following example "
|
||||
"shows best practices with regards to :c:type:`PyUnicode`, :c:type:"
|
||||
"`PyString`, and :c:type:`PyBytes`. ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:95
|
||||
msgid "long/int Unification"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:97
|
||||
msgid ""
|
||||
"Python 3 has only one integer type, :func:`int`. But it actually "
|
||||
"corresponds to Python 2's :func:`long` type--the :func:`int` type used in "
|
||||
"Python 2 was removed. In the C-API, ``PyInt_*`` functions are replaced by "
|
||||
"their ``PyLong_*`` equivalents."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:104
|
||||
msgid "Module initialization and state"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:106
|
||||
msgid ""
|
||||
"Python 3 has a revamped extension module initialization system. (See :pep:"
|
||||
"`3121`.) Instead of storing module state in globals, they should be stored "
|
||||
"in an interpreter specific structure. Creating modules that act correctly "
|
||||
"in both Python 2 and Python 3 is tricky. The following simple example "
|
||||
"demonstrates how. ::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:197
|
||||
msgid "CObject replaced with Capsule"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:199
|
||||
msgid ""
|
||||
"The :c:type:`Capsule` object was introduced in Python 3.1 and 2.7 to "
|
||||
"replace :c:type:`CObject`. CObjects were useful, but the :c:type:`CObject` "
|
||||
"API was problematic: it didn't permit distinguishing between valid CObjects, "
|
||||
"which allowed mismatched CObjects to crash the interpreter, and some of its "
|
||||
"APIs relied on undefined behavior in C. (For further reading on the "
|
||||
"rationale behind Capsules, please see :issue:`5630`.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:206
|
||||
msgid ""
|
||||
"If you're currently using CObjects, and you want to migrate to 3.1 or newer, "
|
||||
"you'll need to switch to Capsules. :c:type:`CObject` was deprecated in 3.1 "
|
||||
"and 2.7 and completely removed in Python 3.2. If you only support 2.7, or "
|
||||
"3.1 and above, you can simply switch to :c:type:`Capsule`. If you need to "
|
||||
"support Python 3.0, or versions of Python earlier than 2.7, you'll have to "
|
||||
"support both CObjects and Capsules. (Note that Python 3.0 is no longer "
|
||||
"supported, and it is not recommended for production use.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:216
|
||||
msgid ""
|
||||
"The following example header file :file:`capsulethunk.h` may solve the "
|
||||
"problem for you. Simply write your code against the :c:type:`Capsule` API "
|
||||
"and include this header file after :file:`Python.h`. Your code will "
|
||||
"automatically use Capsules in versions of Python with Capsules, and switch "
|
||||
"to CObjects when Capsules are unavailable."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:223
|
||||
msgid ""
|
||||
":file:`capsulethunk.h` simulates Capsules using CObjects. However, :c:type:"
|
||||
"`CObject` provides no place to store the capsule's \"name\". As a result "
|
||||
"the simulated :c:type:`Capsule` objects created by :file:`capsulethunk.h` "
|
||||
"behave slightly differently from real Capsules. Specifically:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:228
|
||||
msgid "The name parameter passed in to :c:func:`PyCapsule_New` is ignored."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:230
|
||||
msgid ""
|
||||
"The name parameter passed in to :c:func:`PyCapsule_IsValid` and :c:func:"
|
||||
"`PyCapsule_GetPointer` is ignored, and no error checking of the name is "
|
||||
"performed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:234
|
||||
msgid ":c:func:`PyCapsule_GetName` always returns NULL."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:236
|
||||
msgid ""
|
||||
":c:func:`PyCapsule_SetName` always raises an exception and returns failure. "
|
||||
"(Since there's no way to store a name in a CObject, noisy failure of :c:func:"
|
||||
"`PyCapsule_SetName` was deemed preferable to silent failure here. If this "
|
||||
"is inconvenient, feel free to modify your local copy as you see fit.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:243
|
||||
msgid ""
|
||||
"You can find :file:`capsulethunk.h` in the Python source distribution as :"
|
||||
"source:`Doc/includes/capsulethunk.h`. We also include it here for your "
|
||||
"convenience:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:252
|
||||
msgid "Other options"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/howto/cporting.rst:254
|
||||
msgid ""
|
||||
"If you are writing a new extension module, you might consider `Cython "
|
||||
"<http://cython.org/>`_. It translates a Python-like language to C. The "
|
||||
"extension modules it creates are compatible with Python 3 and Python 2."
|
||||
msgstr ""
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue