# SOME DESCRIPTIVE TITLE. # Copyright (C) 1990-2016, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 2.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-10-30 10:44+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \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 "" "Python's built-in file objects are implemented entirely on the :c:type:`FILE" "\\*` support from the C standard library. This is an implementation detail " "and may change in future releases of Python." msgstr "" #: ../Doc/c-api/file.rst:17 msgid "This subtype of :c:type:`PyObject` represents a Python file object." msgstr "" #: ../Doc/c-api/file.rst:24 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python file type. " "This is exposed to Python programs as ``file`` and ``types.FileType``." msgstr "" #: ../Doc/c-api/file.rst:30 msgid "" "Return true if its argument is a :c:type:`PyFileObject` or a subtype of :c:" "type:`PyFileObject`." msgstr "" #: ../Doc/c-api/file.rst:33 msgid "Allowed subtypes to be accepted." msgstr "" #: ../Doc/c-api/file.rst:39 msgid "" "Return true if its argument is a :c:type:`PyFileObject`, but not a subtype " "of :c:type:`PyFileObject`." msgstr "" #: ../Doc/c-api/file.rst:49 msgid "" "On success, return a new file object that is opened on the file given by " "*filename*, with a file mode given by *mode*, where *mode* has the same " "semantics as the standard C routine :c:func:`fopen`. On failure, return " "*NULL*." msgstr "" #: ../Doc/c-api/file.rst:56 msgid "" "Create a new :c:type:`PyFileObject` from the already-open standard C file " "pointer, *fp*. The function *close* will be called when the file should be " "closed. Return *NULL* and close the file using *close* on failure. *close* " "is optional and can be set to *NULL*." msgstr "" #: ../Doc/c-api/file.rst:64 msgid "Return the file object associated with *p* as a :c:type:`FILE\\*`." msgstr "" #: ../Doc/c-api/file.rst:66 msgid "" "If the caller will ever use the returned :c:type:`FILE\\*` object while the :" "term:`GIL` is released it must also call the :c:func:`PyFile_IncUseCount` " "and :c:func:`PyFile_DecUseCount` functions described below as appropriate." msgstr "" #: ../Doc/c-api/file.rst:73 msgid "" "Increments the PyFileObject's internal use count to indicate that the " "underlying :c:type:`FILE\\*` is being used. This prevents Python from " "calling f_close() on it from another thread. Callers of this must call :c:" "func:`PyFile_DecUseCount` when they are finished with the :c:type:`FILE" "\\*`. Otherwise the file object will never be closed by Python." msgstr "" #: ../Doc/c-api/file.rst:80 msgid "The :term:`GIL` must be held while calling this function." msgstr "" #: ../Doc/c-api/file.rst:82 msgid "" "The suggested use is to call this after :c:func:`PyFile_AsFile` and before " "you release the GIL::" msgstr "" #: ../Doc/c-api/file.rst:99 msgid "" "Decrements the PyFileObject's internal unlocked_count member to indicate " "that the caller is done with its own use of the :c:type:`FILE\\*`. This may " "only be called to undo a prior call to :c:func:`PyFile_IncUseCount`." msgstr "" #: ../Doc/c-api/file.rst:103 msgid "" "The :term:`GIL` must be held while calling this function (see the example " "above)." msgstr "" #: ../Doc/c-api/file.rst:113 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 "" "Cette fonction, équivalente à ``p.readline([n])``, lit une ligne de l'objet " "*p*. *p* peut être un objet fichier ou n'importe quel objet qui possède une " "méthode :meth:`~io.IOBase.readline`. Si *n* vaut ``0``, une seule ligne est " "lue, indépendamment de la taille de la ligne. Si *n* est plus grand que " "``0``, un maximum de *n* octets seront lus en provenance du fichier ; une " "ligne partielle peut être renvoyée. Dans les deux cas, une chaîne de " "caractères vide est renvoyée si la fin du fichier est atteinte " "immédiatement. Cependant, si *n* est plus petit que ``0``, une ligne est lue " "indépendamment de sa taille, mais :exc:`EOFError` est levée si la fin du " "fichier est atteinte immédiatement." #: ../Doc/c-api/file.rst:126 msgid "Return the name of the file specified by *p* as a string object." msgstr "" #: ../Doc/c-api/file.rst:133 msgid "" "Available on systems with :c:func:`setvbuf` only. This should only be " "called immediately after file object creation." msgstr "" #: ../Doc/c-api/file.rst:139 msgid "" "Set the file's encoding for Unicode output to *enc*. Return 1 on success and " "0 on failure." msgstr "" #: ../Doc/c-api/file.rst:147 msgid "" "Set the file's encoding for Unicode output to *enc*, and its error mode to " "*err*. Return 1 on success and 0 on failure." msgstr "" #: ../Doc/c-api/file.rst:157 msgid "" "This function exists for internal use by the interpreter. Set the :attr:" "`softspace` attribute of *p* to *newflag* and return the previous value. *p* " "does not have to be a file object for this function to work properly; any " "object is supported (thought its only interesting if the :attr:`softspace` " "attribute can be set). This function clears any errors, and will return " "``0`` as the previous value if the attribute either does not exist or if " "there were errors in retrieving it. There is no way to detect errors from " "this function, but doing so should not be needed." msgstr "" #: ../Doc/c-api/file.rst:171 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 "" "Écrit l'objet *obj* dans l'objet fichier *p*. La seule option gérée pour " "*flags* est :const:`Py_PRINT_RAW` ; si défini, l'attribut :func:`str` de " "l'objet est écrit à la place de l'attribut :func:`repr`. Retourne ``0`` en " "cas de succès ou ``-1`` en cas échec ; l'exception appropriée sera levée." #: ../Doc/c-api/file.rst:179 msgid "" "Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on " "failure; the appropriate exception will be set." msgstr "" "Écrit la chaîne de caractères *s* dans l'objet fichier *p*. Retourne ``0`` " "en cas de succès ou ``-1`` en cas d'échec ; l'exception appropriée sera mise " "en place."