# Copyright (C) 2001-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 3.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-04-02 22:11+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../Doc/library/textwrap.rst:2 msgid ":mod:`textwrap` --- Text wrapping and filling" msgstr "" #: ../Doc/library/textwrap.rst:10 msgid "**Source code:** :source:`Lib/textwrap.py`" msgstr "" #: ../Doc/library/textwrap.rst:14 msgid "" "The :mod:`textwrap` module provides some convenience functions, as well as :" "class:`TextWrapper`, the class that does all the work. If you're just " "wrapping or filling one or two text strings, the convenience functions " "should be good enough; otherwise, you should use an instance of :class:" "`TextWrapper` for efficiency." msgstr "" #: ../Doc/library/textwrap.rst:22 msgid "" "Wraps the single paragraph in *text* (a string) so every line is at most " "*width* characters long. Returns a list of output lines, without final " "newlines." msgstr "" #: ../Doc/library/textwrap.rst:26 msgid "" "Optional keyword arguments correspond to the instance attributes of :class:" "`TextWrapper`, documented below. *width* defaults to ``70``." msgstr "" #: ../Doc/library/textwrap.rst:29 msgid "" "See the :meth:`TextWrapper.wrap` method for additional details on how :func:" "`wrap` behaves." msgstr "" #: ../Doc/library/textwrap.rst:35 msgid "" "Wraps the single paragraph in *text*, and returns a single string containing " "the wrapped paragraph. :func:`fill` is shorthand for ::" msgstr "" #: ../Doc/library/textwrap.rst:40 msgid "" "In particular, :func:`fill` accepts exactly the same keyword arguments as :" "func:`wrap`." msgstr "" #: ../Doc/library/textwrap.rst:46 msgid "Collapse and truncate the given *text* to fit in the given *width*." msgstr "" #: ../Doc/library/textwrap.rst:48 msgid "" "First the whitespace in *text* is collapsed (all whitespace is replaced by " "single spaces). If the result fits in the *width*, it is returned. " "Otherwise, enough words are dropped from the end so that the remaining words " "plus the :attr:`placeholder` fit within :attr:`width`::" msgstr "" #: ../Doc/library/textwrap.rst:60 msgid "" "Optional keyword arguments correspond to the instance attributes of :class:" "`TextWrapper`, documented below. Note that the whitespace is collapsed " "before the text is passed to the :class:`TextWrapper` :meth:`fill` function, " "so changing the value of :attr:`.tabsize`, :attr:`.expand_tabs`, :attr:`." "drop_whitespace`, and :attr:`.replace_whitespace` will have no effect." msgstr "" #: ../Doc/library/textwrap.rst:71 msgid "Remove any common leading whitespace from every line in *text*." msgstr "" #: ../Doc/library/textwrap.rst:73 msgid "" "This can be used to make triple-quoted strings line up with the left edge of " "the display, while still presenting them in the source code in indented form." msgstr "" #: ../Doc/library/textwrap.rst:76 msgid "" "Note that tabs and spaces are both treated as whitespace, but they are not " "equal: the lines ``\" hello\"`` and ``\"\\thello\"`` are considered to have " "no common leading whitespace." msgstr "" #: ../Doc/library/textwrap.rst:80 ../Doc/library/textwrap.rst:101 msgid "For example::" msgstr "Par exemple ::" #: ../Doc/library/textwrap.rst:94 msgid "Add *prefix* to the beginning of selected lines in *text*." msgstr "" #: ../Doc/library/textwrap.rst:96 msgid "Lines are separated by calling ``text.splitlines(True)``." msgstr "" #: ../Doc/library/textwrap.rst:98 msgid "" "By default, *prefix* is added to all lines that do not consist solely of " "whitespace (including any line endings)." msgstr "" #: ../Doc/library/textwrap.rst:107 msgid "" "The optional *predicate* argument can be used to control which lines are " "indented. For example, it is easy to add *prefix* to even empty and " "whitespace-only lines::" msgstr "" #: ../Doc/library/textwrap.rst:120 msgid "" ":func:`wrap`, :func:`fill` and :func:`shorten` work by creating a :class:" "`TextWrapper` instance and calling a single method on it. That instance is " "not reused, so for applications that process many text strings using :func:" "`wrap` and/or :func:`fill`, it may be more efficient to create your own :" "class:`TextWrapper` object." msgstr "" #: ../Doc/library/textwrap.rst:126 msgid "" "Text is preferably wrapped on whitespaces and right after the hyphens in " "hyphenated words; only then will long words be broken if necessary, unless :" "attr:`TextWrapper.break_long_words` is set to false." msgstr "" #: ../Doc/library/textwrap.rst:132 msgid "" "The :class:`TextWrapper` constructor accepts a number of optional keyword " "arguments. Each keyword argument corresponds to an instance attribute, so " "for example ::" msgstr "" #: ../Doc/library/textwrap.rst:138 msgid "is the same as ::" msgstr "" #: ../Doc/library/textwrap.rst:143 msgid "" "You can re-use the same :class:`TextWrapper` object many times, and you can " "change any of its options through direct assignment to instance attributes " "between uses." msgstr "" #: ../Doc/library/textwrap.rst:147 msgid "" "The :class:`TextWrapper` instance attributes (and keyword arguments to the " "constructor) are as follows:" msgstr "" #: ../Doc/library/textwrap.rst:153 msgid "" "(default: ``70``) The maximum length of wrapped lines. As long as there are " "no individual words in the input text longer than :attr:`width`, :class:" "`TextWrapper` guarantees that no output line will be longer than :attr:" "`width` characters." msgstr "" #: ../Doc/library/textwrap.rst:161 msgid "" "(default: ``True``) If true, then all tab characters in *text* will be " "expanded to spaces using the :meth:`expandtabs` method of *text*." msgstr "" #: ../Doc/library/textwrap.rst:167 msgid "" "(default: ``8``) If :attr:`expand_tabs` is true, then all tab characters in " "*text* will be expanded to zero or more spaces, depending on the current " "column and the given tab size." msgstr "" #: ../Doc/library/textwrap.rst:176 msgid "" "(default: ``True``) If true, after tab expansion but before wrapping, the :" "meth:`wrap` method will replace each whitespace character with a single " "space. The whitespace characters replaced are as follows: tab, newline, " "vertical tab, formfeed, and carriage return (``'\\t\\n\\v\\f\\r'``)." msgstr "" #: ../Doc/library/textwrap.rst:184 msgid "" "If :attr:`expand_tabs` is false and :attr:`replace_whitespace` is true, each " "tab character will be replaced by a single space, which is *not* the same as " "tab expansion." msgstr "" #: ../Doc/library/textwrap.rst:190 msgid "" "If :attr:`replace_whitespace` is false, newlines may appear in the middle of " "a line and cause strange output. For this reason, text should be split into " "paragraphs (using :meth:`str.splitlines` or similar) which are wrapped " "separately." msgstr "" #: ../Doc/library/textwrap.rst:198 msgid "" "(default: ``True``) If true, whitespace at the beginning and ending of every " "line (after wrapping but before indenting) is dropped. Whitespace at the " "beginning of the paragraph, however, is not dropped if non-whitespace " "follows it. If whitespace being dropped takes up an entire line, the whole " "line is dropped." msgstr "" #: ../Doc/library/textwrap.rst:207 msgid "" "(default: ``''``) String that will be prepended to the first line of wrapped " "output. Counts towards the length of the first line. The empty string is " "not indented." msgstr "" #: ../Doc/library/textwrap.rst:214 msgid "" "(default: ``''``) String that will be prepended to all lines of wrapped " "output except the first. Counts towards the length of each line except the " "first." msgstr "" #: ../Doc/library/textwrap.rst:221 msgid "" "(default: ``False``) If true, :class:`TextWrapper` attempts to detect " "sentence endings and ensure that sentences are always separated by exactly " "two spaces. This is generally desired for text in a monospaced font. " "However, the sentence detection algorithm is imperfect: it assumes that a " "sentence ending consists of a lowercase letter followed by one of ``'.'``, " "``'!'``, or ``'?'``, possibly followed by one of ``'\"'`` or ``\"'\"``, " "followed by a space. One problem with this is algorithm is that it is " "unable to detect the difference between \"Dr.\" in ::" msgstr "" #: ../Doc/library/textwrap.rst:232 msgid "and \"Spot.\" in ::" msgstr "" #: ../Doc/library/textwrap.rst:236 msgid ":attr:`fix_sentence_endings` is false by default." msgstr "" #: ../Doc/library/textwrap.rst:238 msgid "" "Since the sentence detection algorithm relies on ``string.lowercase`` for " "the definition of \"lowercase letter,\" and a convention of using two spaces " "after a period to separate sentences on the same line, it is specific to " "English-language texts." msgstr "" #: ../Doc/library/textwrap.rst:246 msgid "" "(default: ``True``) If true, then words longer than :attr:`width` will be " "broken in order to ensure that no lines are longer than :attr:`width`. If " "it is false, long words will not be broken, and some lines may be longer " "than :attr:`width`. (Long words will be put on a line by themselves, in " "order to minimize the amount by which :attr:`width` is exceeded.)" msgstr "" #: ../Doc/library/textwrap.rst:255 msgid "" "(default: ``True``) If true, wrapping will occur preferably on whitespaces " "and right after hyphens in compound words, as it is customary in English. If " "false, only whitespaces will be considered as potentially good places for " "line breaks, but you need to set :attr:`break_long_words` to false if you " "want truly insecable words. Default behaviour in previous versions was to " "always allow breaking hyphenated words." msgstr "" #: ../Doc/library/textwrap.rst:265 msgid "" "(default: ``None``) If not ``None``, then the output will contain at most " "*max_lines* lines, with *placeholder* appearing at the end of the output." msgstr "" #: ../Doc/library/textwrap.rst:273 msgid "" "(default: ``' [...]'``) String that will appear at the end of the output " "text if it has been truncated." msgstr "" #: ../Doc/library/textwrap.rst:279 msgid "" ":class:`TextWrapper` also provides some public methods, analogous to the " "module-level convenience functions:" msgstr "" #: ../Doc/library/textwrap.rst:284 msgid "" "Wraps the single paragraph in *text* (a string) so every line is at most :" "attr:`width` characters long. All wrapping options are taken from instance " "attributes of the :class:`TextWrapper` instance. Returns a list of output " "lines, without final newlines. If the wrapped output has no content, the " "returned list is empty." msgstr "" #: ../Doc/library/textwrap.rst:293 msgid "" "Wraps the single paragraph in *text*, and returns a single string containing " "the wrapped paragraph." msgstr ""