# 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. # 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: 2017-05-16 23:18+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.11\n" #: ../Doc/tutorial/interpreter.rst:5 msgid "Using the Python Interpreter" msgstr "Mode d'emploi de l'interpréteur Python" #: ../Doc/tutorial/interpreter.rst:11 msgid "Invoking the Interpreter" msgstr "Lancement de l'interpréteur" #: ../Doc/tutorial/interpreter.rst:13 msgid "" "The Python interpreter is usually installed as :file:`/usr/local/bin/python` " "on those machines where it is available; putting :file:`/usr/local/bin` in " "your Unix shell's search path makes it possible to start it by typing the " "command ::" msgstr "" "L'interpréteur python est habituellement installé :file:`/usr/local/bin/" "python` sur les machines où il est disponible. En mettant :file:`/usr/local/" "bin` dans les chemins de recherche de votre shell Unix, vous permettez de " "lancer l'interpréteur Python en tapant la commande : ::" #: ../Doc/tutorial/interpreter.rst:19 msgid "" "to the shell. Since the choice of the directory where the interpreter lives " "is an installation option, other places are possible; check with your local " "Python guru or system administrator. (E.g., :file:`/usr/local/python` is a " "popular alternative location.)" msgstr "" "dans le shell. Le choix du répertoire où se trouve l'interpréteur étant une " "option d'installation, d'autres chemins sont possibles; voyez avec votre " "guru Python local ou votre administrateur système. (Par exemple, :file:`/usr/" "local/python` est une localisation courante.)" #: ../Doc/tutorial/interpreter.rst:24 msgid "" "On Windows machines, the Python installation is usually placed in :file:`C:\\" "\\Python27`, though you can change this when you're running the installer. " "To add this directory to your path, you can type the following command into " "the command prompt in a DOS box::" msgstr "" "Sur les machines Windows, l'installation de Python se situe généralement " "dans :file:`C:\\\\Python27`, bien que vous puissiez changer cela lorsque " "vous lancer l'installateur. Pour ajouter ce chemin dans vos chemins de " "recherche, vous pouvez taper la commande suivante dans votre émulateur de " "terminal DOS ::" #: ../Doc/tutorial/interpreter.rst:31 msgid "" "Typing an end-of-file character (:kbd:`Control-D` on Unix, :kbd:`Control-Z` " "on Windows) at the primary prompt causes the interpreter to exit with a zero " "exit status. If that doesn't work, you can exit the interpreter by typing " "the following command: ``quit()``." msgstr "" "Tapez un caractère de fin de fichier (:kbd:`Ctrl-D` sous Unix, :kbd:`Ctrl-Z` " "sous Windows) dans une invite de commande primaire provoque la fermeture de " "l'interpréteur avec un code de sortie nul. Si cela ne fonctionne pas, vous " "pouvez fermer l'interpréteur en tapant la commande ``quit()``." #: ../Doc/tutorial/interpreter.rst:36 msgid "" "The interpreter's line-editing features usually aren't very sophisticated. " "On Unix, whoever installed the interpreter may have enabled support for the " "GNU readline library, which adds more elaborate interactive editing and " "history features. Perhaps the quickest check to see whether command line " "editing is supported is typing :kbd:`Control-P` to the first Python prompt " "you get. If it beeps, you have command line editing; see Appendix :ref:`tut-" "interacting` for an introduction to the keys. If nothing appears to happen, " "or if ``^P`` is echoed, command line editing isn't available; you'll only be " "able to use backspace to remove characters from the current line." msgstr "" "Les fonctionnalités d'édition de ligne en mode interactif ne sont pas très " "sophistiquées. Sur Unix, celui qui à installé Python peut avoir activé le " "support de *GNU readline*, qui ajoute quelques fonctionnalités d'édition, et " "la gestion de l'historique. Le moyen probablement le plus rapide pour " "savoir si l'édition est gérée est de taper :kbd:`Control-P` au premier " "prompt Python. Si ça *beep* vous avez l'édition. Voir l'appendice :ref:`tut-" "interacting` à propos des raccourcis clavier. Si rien n'apparaît ou si " "``^P`` est affiché, l'édition de la ligne n'est pas disponible, vous ne " "pourrez qu'utiliser que la touche retour arrière pour supprimer des " "caractères de la ligne actuelle." #: ../Doc/tutorial/interpreter.rst:46 msgid "" "The interpreter operates somewhat like the Unix shell: when called with " "standard input connected to a tty device, it reads and executes commands " "interactively; when called with a file name argument or with a file as " "standard input, it reads and executes a *script* from that file." msgstr "" "L'interpréteur fonctionne de façon similaire au shell Unix : lorsqu'il est " "appelé avec l'entrée standard connectée à un périphérique tty, il lit et " "exécute les commandes de façon interactive ; lorsqu'il est appelé avec un " "nom de fichier en argument ou avec un fichier comme entrée standard, il lit " "et exécute un *script* depuis ce fichier." #: ../Doc/tutorial/interpreter.rst:51 msgid "" "A second way of starting the interpreter is ``python -c command [arg] ...``, " "which executes the statement(s) in *command*, analogous to the shell's :" "option:`-c` option. Since Python statements often contain spaces or other " "characters that are special to the shell, it is usually advised to quote " "*command* in its entirety with single quotes." msgstr "" "Une autre façon de lancer l'interpréteur est ``python -c commande [arg] ..." "``. Cela exécute les instructions de *commande* de façon analogue à " "l'option :option:`-c` du shell. Parce que les instructions Python " "contiennent souvent des espaces et d'autres caractères spéciaux pour le " "shell, il est généralement conseillé de mettre *commande* entre guillemets " "simples." #: ../Doc/tutorial/interpreter.rst:57 msgid "" "Some Python modules are also useful as scripts. These can be invoked using " "``python -m module [arg] ...``, which executes the source file for *module* " "as if you had spelled out its full name on the command line." msgstr "" "Certains modules Python sont aussi utiles en tant que scripts. Ils peuvent " "être appelés avec ``python -m module [arg] ...`` qui exécute le fichier " "source de *module* comme si vous aviez tapé son nom complet dans la ligne de " "commande." #: ../Doc/tutorial/interpreter.rst:61 msgid "" "When a script file is used, it is sometimes useful to be able to run the " "script and enter interactive mode afterwards. This can be done by passing :" "option:`-i` before the script." msgstr "" "Quand un fichier de script est utilisé, il est parfois utile de pouvoir " "lancer le script puis d'entrer dans le mode interactif après coup. Cela est " "possible en passant :option:`-i` avant le script." #: ../Doc/tutorial/interpreter.rst:65 msgid "All command-line options are described in :ref:`using-on-general`." msgstr "" "Tous les paramètres utilisables en ligne de commande sont documentés dans :" "ref:`using-on-general`." #: ../Doc/tutorial/interpreter.rst:71 msgid "Argument Passing" msgstr "Passage d'arguments" #: ../Doc/tutorial/interpreter.rst:73 msgid "" "When known to the interpreter, the script name and additional arguments " "thereafter are turned into a list of strings and assigned to the ``argv`` " "variable in the ``sys`` module. You can access this list by executing " "``import sys``. The length of the list is at least one; when no script and " "no arguments are given, ``sys.argv[0]`` is an empty string. When the script " "name is given as ``'-'`` (meaning standard input), ``sys.argv[0]`` is set " "to ``'-'``. When :option:`-c` *command* is used, ``sys.argv[0]`` is set to " "``'-c'``. When :option:`-m` *module* is used, ``sys.argv[0]`` is set to " "the full name of the located module. Options found after :option:`-c` " "*command* or :option:`-m` *module* are not consumed by the Python " "interpreter's option processing but left in ``sys.argv`` for the command or " "module to handle." msgstr "" "Lorsqu'ils sont connus de l'interpréteur, le nom du script et les arguments " "additionnels sont représentés sous forme d'une liste assignée à la variable " "``argv`` du module ``sys``. Vous pouvez y accéder en exécutant ``import " "sys``. La liste contient au minimum un élément ; quand aucun script ni aucun " "argument n'est donné, ``sys.argv[0]`` est une chaine vide. Quand ``'-'`` " "(qui représente l'entrée standard) est passé comme nom de script, ``sys." "argv[0]`` contient ``'-'``. Quand :option:`-c` *commande* est utilisé, ``sys." "argv[0]`` contient ``'-c'``. Enfin, quand :option:`-m` *module* est utilisé, " "le nom complet du module est assigné à ``sys.argv[0]``. Les options trouvées " "après :option:`-c` *commande* ou :option:`-m` *module* ne sont pas lues " "comme options de l'interpréteur Python mais laissées dans ``sys.argv`` pour " "être utilisées par le module ou la commande." #: ../Doc/tutorial/interpreter.rst:89 msgid "Interactive Mode" msgstr "Mode interactif" #: ../Doc/tutorial/interpreter.rst:91 msgid "" "When commands are read from a tty, the interpreter is said to be in " "*interactive mode*. In this mode it prompts for the next command with the " "*primary prompt*, usually three greater-than signs (``>>>``); for " "continuation lines it prompts with the *secondary prompt*, by default three " "dots (``...``). The interpreter prints a welcome message stating its version " "number and a copyright notice before printing the first prompt:" msgstr "" "Lorsque des commandes sont lues depuis un tty, l'interpréteur est dit être " "en *mode interactif*. Dans ce mode, il demande la commande suivante avec le " "*prompt primaire*, en général trois signes plus-grand-que (``>>>``) ; pour " "les lignes de continuation, il affiche le *prompt secondaire*, par défaut " "trois points (``...``). L'interpréteur affiche un message de bienvenue " "indiquant son numéro de version et une notice de copyright avant d'afficher " "le premier prompt :" #: ../Doc/tutorial/interpreter.rst:105 msgid "" "Continuation lines are needed when entering a multi-line construct. As an " "example, take a look at this :keyword:`if` statement::" msgstr "" "Les lignes de continuation sont nécessaires pour entrer une construction " "multi-lignes. Par exemple, regardez cette instruction :keyword:`if` ::" #: ../Doc/tutorial/interpreter.rst:115 msgid "For more on interactive mode, see :ref:`tut-interac`." msgstr "" "Pour plus d'informations sur le mode interactif, voir :ref:`tut-interac`." #: ../Doc/tutorial/interpreter.rst:121 msgid "The Interpreter and Its Environment" msgstr "L'interpréteur et son environnement" #: ../Doc/tutorial/interpreter.rst:127 msgid "Source Code Encoding" msgstr "Encodage du code source" #: ../Doc/tutorial/interpreter.rst:129 msgid "" "It is possible to use encodings different than ASCII in Python source files. " "The best way to do it is to put one more special comment line right after " "the ``#!`` line to define the source file encoding::" msgstr "" "Il est possible d'utiliser un autre encodage que l'ASCII dans un fichier " "source Python. La meilleure façon de faire est de placer un commentaire " "spécial supplémentaire juste après le ``#!`` pour définir l'encodage du " "fichier source::" #: ../Doc/tutorial/interpreter.rst:136 msgid "" "With that declaration, all characters in the source file will be treated as " "having the encoding *encoding*, and it will be possible to directly write " "Unicode string literals in the selected encoding. The list of possible " "encodings can be found in the Python Library Reference, in the section on :" "mod:`codecs`." msgstr "" "Avec cette déclaration, tous les caractères du fichier source sont traités " "comme étant dans l'encodage *encoding* et il est possible de d'écrire " "directement des littéraux de chaîne Unicode dans l'encodage choisi. La liste " "des encodages disponibles peut être trouvée dans la référence de la " "bibliothèque Python dans la partie à propos de :mod:`codecs`." #: ../Doc/tutorial/interpreter.rst:142 msgid "" "For example, to write Unicode literals including the Euro currency symbol, " "the ISO-8859-15 encoding can be used, with the Euro symbol having the " "ordinal value 164. This script, when saved in the ISO-8859-15 encoding, " "will print the value 8364 (the Unicode code point corresponding to the Euro " "symbol) and then exit::" msgstr "" "Par exemple, pour écrire des caractères Unicode comme le symbole Euro, " "l'encodage *ISO-8859-15* peut être utilisé, dans celui-ci le symbole Euro à " "la valeur 164. Ce script, lorsqu'il est sauvegardé avec l'encodage " "*ISO-8859-15* affichera la valeur 8364 (le point de code Unicode pour le " "symbole Euro) puis quitera: ::" #: ../Doc/tutorial/interpreter.rst:152 msgid "" "If your editor supports saving files as ``UTF-8`` with a UTF-8 *byte order " "mark* (aka BOM), you can use that instead of an encoding declaration. IDLE " "supports this capability if ``Options/General/Default Source Encoding/" "UTF-8`` is set. Notice that this signature is not understood in older Python " "releases (2.2 and earlier), and also not understood by the operating system " "for script files with ``#!`` lines (only used on Unix systems)." msgstr "" "Si votre éditeur peut enregistrer les fichiers en ``UTF-8`` avec un " "indicateur d'ordre des octets (*BOM*), vous pouvez l'utiliser à la place de " "la déclaration d'encodage. IDLE peut le faire si l'option ``Options/General/" "Default Source Encoding/UTF-8`` est configurée. Notez que cet indicateur " "n'est pas géré par les versions plus anciennes de Python (plus vieilles que " "2.2 inclue), et aussi n'est pas compris par le shebang unix ``#!``." #: ../Doc/tutorial/interpreter.rst:159 msgid "" "By using UTF-8 (either through the signature or an encoding declaration), " "characters of most languages in the world can be used simultaneously in " "string literals and comments. Using non-ASCII characters in identifiers is " "not supported. To display all these characters properly, your editor must " "recognize that the file is UTF-8, and it must use a font that supports all " "the characters in the file." msgstr "" "En utilisant UTF-8 (soit via un indicateur soit via une déclaration), les " "caractères de la pluspart les langages du monde peuvent être utilisés dans " "les mêmes chaînes de caractères litérales, et dans les commentaires. " "Utiliser des caractères autres que les caractères ASCII dans les " "identifiants n'est pas supporté. Pour afficher tous ces caractères " "correctement, votre éditeur doit reconnaître que le fichier est encodé en " "UTF-8, et il doit utiliser une fonte de caractères comprenant tous les " "caractères utilisés dans le fichier."