mirror of
https://forge.apps.education.fr/blender-edutech/jumeaux-numeriques.git
synced 2024-01-27 06:56:18 +01:00
Ecriture de la documentation pour python et du système suite
This commit is contained in:
parent
920cacc10d
commit
7e53b6d868
5
asset/icons/doc/arduino/AUTHORS.md
Normal file
5
asset/icons/doc/arduino/AUTHORS.md
Normal file
@ -0,0 +1,5 @@
|
||||
Icons by Arduino.cc
|
||||
|
||||
Licence : http://arduino.cc
|
||||
|
||||
Website : http://arduino.cc
|
1
asset/icons/doc/arduino/arduino.svg
Normal file
1
asset/icons/doc/arduino/arduino.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="490" stroke="#00979c"><g fill="none"><path d="M174 30C78.9 22.43-1 135 38 222c38 94.4 181 120 249 44.4 65.9-64.6 91.3-164 172-215 82-56 214-3.12 230 96.4 15.6 95.3-87.1 188-180 160-68.7-15.5-118-74.2-146-136-34.5-59-79.6-122-150-138-12.5-2.84-25.4-3.96-38.2-3.94z" stroke-width="59"/><path d="m118 165h120" stroke-width="25"/><path d="m486 165h100m-51-50v100" stroke-width="32"/></g><path d="M84 485l-6.4-23H37l-6.6 23H8.7l34.4-116h30.6l34.4 116zm-26.4-95l-15.3 54.1h30.4zM180 485s-11.7-27.6-18.3-41c-3.83-5.76-11.4-8.02-18-7.1-.6 15.7-.48 48.1-.48 48.1h-21.9V369s33-.97 49.4 1.2c34.7 3.92 37 54.4 2.13 59.7 6.54 2.6 10.5 8.65 13.3 14.8l17.5 36.2c1.23 2.48 1.2 4.4-2.34 4.38zm-5.42-82.1c-.1-17.9-18-15.9-31.3-16v32.8c15.7.53 31-1.07 31.3-16.8zM302 455c-10.6 24.5-33.8 30.2-55.8 29.8h-26.9v-116l40.9.2c50.6 1.65 52.4 56.2 41.7 86.4zm-28-61.3c-10.2-8.76-21.4-6.97-32.8-6.97v79.7c10 0 20.9.8 29.4-5.4 18.1-11.4 15.8-54.6 3.35-67.3zM407 442c2.17 58.6-81.5 58.4-84 12.7-1.53-14-.27-28-.68-42v-44.2h21.9l.4 83c2.57 22.9 33 20.9 37.6 8.2 4.66-10.1 2.5-21.5 2.98-32.3v-58.9h21.9V442zm21-56v-17.9h73.5V386h-25.6v80.4h25.6v18.1H428v-18.1h25.6V386zm155 99l-37.6-84.4V485h-19.9V369h26.9l37.4 83.6c.1-6 .04-83.6.04-83.6h19.9v116zm117-10c-24.3 20.9-66.7 16.3-75.1-24.9-11.5-62.6 22.4-98.6 69.6-77.6 29 16.3 27.4 83.4 5.5 103zm-29.3-88.7c-20.7-.55-23.7 20.6-24.5 30.8-.17 19.3-1.88 51.4 24.9 50 8.3 0 15.5-6.02 18.2-13.7 5.45-12.1 9.56-68.1-18.6-67.1zM676 13.4v2.34h5.15v13.6h2.66v-13.6h5.2V13.4zm14.8 0v15.9h2.43V15.7l4.3 13.6h2.4l4.1-13.3v13.3h2.4V13.4h-3.8l-3.9 12.7-4-12.7z" fill="#00979c"/><title>wiki:Behnam N</title></svg>
|
After Width: | Height: | Size: 1.6 KiB |
1
asset/icons/doc/game-icons/system/back-forth.svg
Normal file
1
asset/icons/doc/game-icons/system/back-forth.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#ffffff" fill-opacity="1"></path><g class="" style="" transform="translate(0,0)"><path d="M241.844 28.625l-21.188 5.063L33.25 78.53l-9.594 2.282 2.813 9.47 54.718 184.03 6.156 20.782 10.875-18.75 36.624-63.125 39.344 22.655 9.375-16.188-47.47-27.312L128 187.72l-4.656 8.06-30.406 52.47-45.75-153.844 156.625-37.47-30.344 52.345-4.69 8.126 8.126 4.656L332.75 211.75l-17.594 30.344 16.22 9.312 22.25-38.375 4.687-8.124-8.125-4.656-155.844-89.688 36.594-63.093 10.906-18.845zm-28.25 176.47l-57.438 99.31 155.22 89.5 8.093 4.658-4.69 8.093-44.06 76.25 218.81-52.5-63.874-215.47-44.094 76.25-4.656 8.064-8.094-4.656-155.218-89.5z" fill="#000000" fill-opacity="1"></path></g></svg>
|
After Width: | Height: | Size: 806 B |
8
asset/icons/doc/python/AUTHORS.md
Normal file
8
asset/icons/doc/python/AUTHORS.md
Normal file
@ -0,0 +1,8 @@
|
||||
Icons by Python.org
|
||||
|
||||
Authors :
|
||||
- TM / ®Python Software Foundation
|
||||
|
||||
Licence : https://www.python.org/psf/trademarks/
|
||||
|
||||
Website : https://www.python.org
|
54
asset/icons/doc/python/python.svg
Normal file
54
asset/icons/doc/python/python.svg
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg version="1.0" id="svg2" sodipodi:version="0.32" inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)" sodipodi:docname="python-logo-only.svg" width="83.371017pt" height="101.00108pt" inkscape:export-filename="python-logo-only.png" inkscape:export-xdpi="232.44" inkscape:export-ydpi="232.44" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<metadata id="metadata371">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview inkscape:window-height="2080" inkscape:window-width="1976" inkscape:pageshadow="2" inkscape:pageopacity="0.0" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#ffffff" id="base" inkscape:zoom="2.1461642" inkscape:cx="91.558698" inkscape:cy="47.9926" inkscape:window-x="1092" inkscape:window-y="72" inkscape:current-layer="svg2" width="210mm" height="40mm" units="mm" inkscape:showpageshadow="2" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" inkscape:document-units="pt" showgrid="false" inkscape:window-maximized="0"/>
|
||||
<defs id="defs4">
|
||||
<linearGradient id="linearGradient2795">
|
||||
<stop style="stop-color:#b8b8b8;stop-opacity:0.49803922;" offset="0" id="stop2797"/>
|
||||
<stop style="stop-color:#7f7f7f;stop-opacity:0;" offset="1" id="stop2799"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient2787">
|
||||
<stop style="stop-color:#7f7f7f;stop-opacity:0.5;" offset="0" id="stop2789"/>
|
||||
<stop style="stop-color:#7f7f7f;stop-opacity:0;" offset="1" id="stop2791"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient3676">
|
||||
<stop style="stop-color:#b2b2b2;stop-opacity:0.5;" offset="0" id="stop3678"/>
|
||||
<stop style="stop-color:#b3b3b3;stop-opacity:0;" offset="1" id="stop3680"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient3236">
|
||||
<stop style="stop-color:#f4f4f4;stop-opacity:1" offset="0" id="stop3244"/>
|
||||
<stop style="stop-color:white;stop-opacity:1" offset="1" id="stop3240"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient4671">
|
||||
<stop style="stop-color:#ffd43b;stop-opacity:1;" offset="0" id="stop4673"/>
|
||||
<stop style="stop-color:#ffe873;stop-opacity:1" offset="1" id="stop4675"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient4689">
|
||||
<stop style="stop-color:#5a9fd4;stop-opacity:1;" offset="0" id="stop4691"/>
|
||||
<stop style="stop-color:#306998;stop-opacity:1;" offset="1" id="stop4693"/>
|
||||
</linearGradient>
|
||||
<linearGradient x1="224.23996" y1="144.75717" x2="-65.308502" y2="144.75717" id="linearGradient2987" xlink:href="#linearGradient4671" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)"/>
|
||||
<linearGradient x1="172.94208" y1="77.475983" x2="26.670298" y2="76.313133" id="linearGradient2990" xlink:href="#linearGradient4689" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4689" id="linearGradient2587" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)" x1="172.94208" y1="77.475983" x2="26.670298" y2="76.313133"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4671" id="linearGradient2589" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)" x1="224.23996" y1="144.75717" x2="-65.308502" y2="144.75717"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4689" id="linearGradient2248" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)" x1="172.94208" y1="77.475983" x2="26.670298" y2="76.313133"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4671" id="linearGradient2250" gradientUnits="userSpaceOnUse" gradientTransform="translate(100.2702,99.61116)" x1="224.23996" y1="144.75717" x2="-65.308502" y2="144.75717"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4671" id="linearGradient2255" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.562541,0,0,0.567972,-11.5974,-7.60954)" x1="224.23996" y1="144.75717" x2="-65.308502" y2="144.75717"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4689" id="linearGradient2258" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.562541,0,0,0.567972,-11.5974,-7.60954)" x1="172.94208" y1="76.176224" x2="26.670298" y2="76.313133"/>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient2795" id="radialGradient2801" cx="61.518883" cy="132.28575" fx="61.518883" fy="132.28575" r="29.036913" gradientTransform="matrix(1,0,0,0.177966,0,108.7434)" gradientUnits="userSpaceOnUse"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4671" id="linearGradient1475" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.562541,0,0,0.567972,-14.99112,-11.702371)" x1="150.96111" y1="192.35176" x2="112.03144" y2="137.27299"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient4689" id="linearGradient1478" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.562541,0,0,0.567972,-14.99112,-11.702371)" x1="26.648937" y1="20.603781" x2="135.66525" y2="114.39767"/>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient2795" id="radialGradient1480" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.7490565e-8,-0.23994696,1.054668,3.7915457e-7,-83.7008,142.46201)" cx="61.518883" cy="132.28575" fx="61.518883" fy="132.28575" r="29.036913"/>
|
||||
</defs>
|
||||
<path style="fill:url(#linearGradient1478);fill-opacity:1" d="M 54.918785,9.1927421e-4 C 50.335132,0.02221727 45.957846,0.41313697 42.106285,1.0946693 30.760069,3.0991731 28.700036,7.2947714 28.700035,15.032169 v 10.21875 h 26.8125 v 3.40625 h -26.8125 -10.0625 c -7.792459,0 -14.6157588,4.683717 -16.7499998,13.59375 -2.46181998,10.212966 -2.57101508,16.586023 0,27.25 1.9059283,7.937852 6.4575432,13.593748 14.2499998,13.59375 h 9.21875 v -12.25 c 0,-8.849902 7.657144,-16.656248 16.75,-16.65625 h 26.78125 c 7.454951,0 13.406253,-6.138164 13.40625,-13.625 v -25.53125 c 0,-7.2663386 -6.12998,-12.7247771 -13.40625,-13.9374997 C 64.281548,0.32794397 59.502438,-0.02037903 54.918785,9.1927421e-4 Z m -14.5,8.21875012579 c 2.769547,0 5.03125,2.2986456 5.03125,5.1249996 -2e-6,2.816336 -2.261703,5.09375 -5.03125,5.09375 -2.779476,-1e-6 -5.03125,-2.277415 -5.03125,-5.09375 -10e-7,-2.826353 2.251774,-5.1249996 5.03125,-5.1249996 z" id="path1948"/>
|
||||
<path style="fill:url(#linearGradient1475);fill-opacity:1" d="m 85.637535,28.657169 v 11.90625 c 0,9.230755 -7.825895,16.999999 -16.75,17 h -26.78125 c -7.335833,0 -13.406249,6.278483 -13.40625,13.625 v 25.531247 c 0,7.266344 6.318588,11.540324 13.40625,13.625004 8.487331,2.49561 16.626237,2.94663 26.78125,0 6.750155,-1.95439 13.406253,-5.88761 13.40625,-13.625004 V 86.500919 h -26.78125 v -3.40625 h 26.78125 13.406254 c 7.792461,0 10.696251,-5.435408 13.406241,-13.59375 2.79933,-8.398886 2.68022,-16.475776 0,-27.25 -1.92578,-7.757441 -5.60387,-13.59375 -13.406241,-13.59375 z m -15.0625,64.65625 c 2.779478,3e-6 5.03125,2.277417 5.03125,5.093747 -2e-6,2.826354 -2.251775,5.125004 -5.03125,5.125004 -2.76955,0 -5.03125,-2.29865 -5.03125,-5.125004 2e-6,-2.81633 2.261697,-5.093747 5.03125,-5.093747 z" id="path1950"/>
|
||||
<ellipse style="opacity:0.44382;fill:url(#radialGradient1480);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:15.4174;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path1894" cx="55.816761" cy="127.70079" rx="35.930977" ry="6.9673119"/>
|
||||
</svg>
|
After Width: | Height: | Size: 8.0 KiB |
@ -12,30 +12,26 @@
|
||||
# Documentation du système
|
||||
################################################################################
|
||||
|
||||
system_card=["model-card", "twins-card", "movement-card", "sensor-card", "gyro-card", "board-card"]
|
||||
system_card=["twins-card", "serial-card", "movement-card", "sensor-card", "gyro-card", "board-card", "model-card", "arduino-card"]
|
||||
card_description ={}
|
||||
|
||||
# Maquette
|
||||
card_model_title="Maquette"
|
||||
card_model_text=""" Le modèle 3D est basé sur la maquette \n développée par l\"entreprise A4 Technologie. \n
|
||||
Les documents techniques et \n pédagogiques signés A4 Technologie \n sont diffusés librement sous licence \n Creative Commons BY-NC-SA."""
|
||||
card_model_url=[["Wiki A4 Technologie","https://www.a4.fr/wiki/index.php?title=Portail_coulissant_(BE-APORT-COUL)"]]
|
||||
card_description.update({"model-card" : [card_model_title, card_model_text, card_model_url]})
|
||||
|
||||
# Jumeau numérique
|
||||
# Message envoyé (asynchrone) : \n avancer : a, reculer : r, droite : d, \n gauche g, marquer : m et forer : f \n\n\n """
|
||||
card_twins_title="Jumeau numérique"
|
||||
card_twins_text=""" jumeau() \n -> Active le jumeau réel.\n
|
||||
jumeau_config(port, vitesse) \n -> Définit la configuration de la liaison \n série.
|
||||
|
||||
Si le port n\"est pas spécifié, il sera \n recherché automatiquement \n (carte Arduino Uno ou Mega). \n
|
||||
jumeau_config(port, vitesse) \n -> Définit la configuration de la liaison \n série.\n
|
||||
Si le port n\"est pas spécifié, il sera \n recherché automatiquement (carte \n Arduino Uno ou Mega). \n
|
||||
La vitesse par défaut est 115200 baud."""
|
||||
card_twins_url=[["Microcontrôleur Arduino","https://www.arduino.cc/"],
|
||||
["Liaison série : pySerial","https://pythonhosted.org/pyserial/"],
|
||||
["Protocole Firmata : pyFirmata","https://github.com/tino/pyFirmata"]]
|
||||
card_twins_url=[]
|
||||
card_description.update({"twins-card" : [card_twins_title, card_twins_text, card_twins_url]})
|
||||
|
||||
# Message envoyé (asynchrone) : \n avancer : a, reculer : r, droite : d, \n gauche g, marquer : m et forer : f \n\n\n """
|
||||
# serie_msg(texte) \n -> Envoi un message \n \n texte=serie_rcpt() \n -> Reçoit un message"""
|
||||
# Liaison série
|
||||
card_serial_title="Liaison série"
|
||||
card_serial_text=""" serie_msg(texte) \n -> Envoi un message \n
|
||||
texte=serie_rcpt() \n -> Reçoit un message"""
|
||||
card_serial_url=[["Liaison série : pySerial","https://pythonhosted.org/pyserial/"],
|
||||
["Protocole Firmata : pyFirmata","https://github.com/tino/pyFirmata"]]
|
||||
card_description.update({"serial-card" : [card_serial_title, card_serial_text, card_serial_url]})
|
||||
|
||||
# Ouvrir et fermer
|
||||
card_movement_title="Ouvrir et fermer"
|
||||
@ -63,10 +59,30 @@ card_description.update({"gyro-card" : [card_gyro_title, card_gyro_text, card_gy
|
||||
card_board_title="Pupitre"
|
||||
card_board_text= """ bp_ext() \n -> Bouton poussoir coté rue\n Retourne True si le bouton est pressé.\n
|
||||
bp_int() \n -> Bouton poussoir coté cour\n Retourne True si le bouton est pressé."""
|
||||
# card_board_text=" rp_marquer() \n -> Place une balise sur la case. \n \n Ropy possède que 20 balises, il ne \n peut pas en poser une de plus.\n\n Avec l'amélioration \"Balise +\", le \n nombre de balise transportées est \n étendu à 200."
|
||||
card_board_url=[]
|
||||
card_description.update({"board-card" : [card_board_title, card_board_text, card_board_url]})
|
||||
|
||||
# Maquette
|
||||
card_model_title="Maquette"
|
||||
card_model_text=""" Le modèle 3D est basé sur la maquette \n développée par l\"entreprise A4 Technologie. \n
|
||||
Les documents techniques et \n pédagogiques signés A4 Technologie \n sont diffusés librement sous licence \n Creative Commons BY-NC-SA. \n
|
||||
Le pilotage de la maquette se fait par une \n carte Arduino (Uno ou Mega) reliée à \n l"ordinateur via la liaison série (USB) et le \n protocole Firmata."""
|
||||
card_model_url=[["A4 Technologie","https://www.a4.fr"],
|
||||
["Maquette A4 Technologie","https://www.a4.fr/wiki/index.php?title=Portail_coulissant_(BE-APORT-COUL)"]]
|
||||
card_description.update({"model-card" : [card_model_title, card_model_text, card_model_url]})
|
||||
|
||||
# Arduino
|
||||
card_arduino_title="Arduino"
|
||||
card_arduino_text=""" Arduino une plateforme open-source de \n développement électronique basée sur \n le microcontrôleur de la famille ATmega.
|
||||
|
||||
Elle est utilisée pour la création d"objets \n électroniques interactifs et connectés : \n IoT, domotique, robotique, ...
|
||||
|
||||
Le langage de programmation est le C. Par \n la bibliothèque Arduino il est particulièrement \n aisé d"accéder aux entrées/sorties de la
|
||||
carte. Les platines permettent l"ajout \n d"extensions : relais, Grove, RFID, GPS, ... """
|
||||
|
||||
card_arduino_url=[["Plateforme Arduino","https://www.arduino.cc/"]]
|
||||
card_description.update({"arduino-card" : [card_arduino_title, card_arduino_text, card_arduino_url]})
|
||||
|
||||
##
|
||||
# Envoi des données
|
||||
##
|
||||
|
Binary file not shown.
63
twin_doc.py
63
twin_doc.py
@ -45,8 +45,8 @@ card_description.update(system.get_card_description())
|
||||
# Documentation Python
|
||||
###############################################################################
|
||||
|
||||
# python_card=["function-card", "alternative-card", "loop-card", "flow-card", "text-card", "list-card", "dict-card", "oop-card", "console-card", "sleep-card"]
|
||||
python_card=["function-card", "alternative-card", "loop-card", "flow-card", "console-card", "sleep-card"]
|
||||
# "oop-card"
|
||||
python_card=["function-card", "alternative-card", "loop-card", "flow-card", "text-card", "list-card", "dict-card", "console-card", "sleep-card", "python-card"]
|
||||
|
||||
# Fonction
|
||||
card_function_title="Fonction"
|
||||
@ -79,31 +79,55 @@ card_description.update({"loop-card" : [card_loop_title, card_loop_text, card_lo
|
||||
|
||||
# Flux
|
||||
card_flow_title="Contrôle du flux"
|
||||
card_flow_text=""" Les structures (if, while, for) peuvent \n être gérées plus finement par les \n fonctions \'break\', \'continue\' et \'pass\'. \n
|
||||
- \'break\' : termine l\"itération en cours et \n arrête la boucle.
|
||||
- \'continue\' : termine l\"itération en cours et \n reprend la boucle.
|
||||
- \'pass\' : instruction vide."""
|
||||
card_flow_text=""" Les structures (if, while, for) peuvent \n être gérées plus finement par les \n fonctions 'break', 'continue' et 'pass'. \n
|
||||
- 'break' : termine l"itération en cours et \n arrête la boucle.
|
||||
- 'continue' : termine l"itération en cours et \n reprend la boucle.
|
||||
- 'pass' : instruction vide."""
|
||||
card_flow_url=[["w3schools.com : break","https://www.w3schools.com/python/ref_keyword_break.asp"],
|
||||
["w3schools.com : continue","https://www.w3schools.com/python/ref_keyword_break.asp"],
|
||||
["w3schools.com : pass","https://www.w3schools.com/python/ref_keyword_pass.asp"]]
|
||||
card_description.update({"flow-card" : [card_flow_title, card_flow_text, card_flow_url]})
|
||||
|
||||
# Chaine de caractère
|
||||
card_text_title="Chaîne de caractères\n(texte)"
|
||||
card_text_text="\nFIXME"
|
||||
card_text_url=[["w3schools.com : strings","https://www.w3schools.com/python/python_strings.asp"]]
|
||||
# Chaîne de caractères
|
||||
card_text_title="Chaîne de caractères"
|
||||
card_text_text=""" Une chaîne de caractères correspond à un \n texte (mot, phrase). Elle est délimitée \n par " ou ' : texte = 'Bonjour ! ' \n
|
||||
- texte1 + texte2 : concaténe plusieurs \n chaînes.
|
||||
- len(texte) : renvoie la longueur de texte.
|
||||
- "\\n" : caractère aller à la ligne.
|
||||
- texte[i] : renvoie le caractère du rang i de \n texte (commence à 0).
|
||||
- texte[2:5] : renvoie les caractères du rang \n 2 au rang 5.
|
||||
- texte.replace("a","b") : remplace les "a" en "b". """
|
||||
card_text_url=[
|
||||
["Doc. Python v3 Français : string","https://docs.python.org/fr/3/library/string.html"],
|
||||
["w3schools.com : strings","https://www.w3schools.com/python/python_strings.asp"]]
|
||||
card_description.update({"text-card" : [card_text_title, card_text_text, card_text_url]})
|
||||
|
||||
# Liste
|
||||
card_list_title="Liste"
|
||||
card_list_text="FIXME"
|
||||
card_list_url=[["w3schools.com : lists","https://www.w3schools.com/python/python_lists.asp"]]
|
||||
card_list_text=""" Une liste est une séquence d"éléments. \n Elle est délimitée par des crochets :
|
||||
liste = ['pomme', 7, 'rouge', True] \n
|
||||
- liste[i] : renvoie l"élément du rang i de la \n liste (commence à 0).
|
||||
- liste.append('neige') : ajoute 'neige' à la \n fin de la liste.
|
||||
- len(liste) : renvoie le nombre d"éléments.
|
||||
- liste.sort() : classe par ordre croissant la \n liste (alphabétiquement / numériquement).
|
||||
- liste.remove('rouge') : enlève la première \n occurence de la valeur."""
|
||||
card_list_url=[
|
||||
["Doc. Python v3 Français : list","https://docs.python.org/fr/3/library/stdtypes.html#sequence-types-list-tuple-range"],
|
||||
["w3schools.com : lists","https://www.w3schools.com/python/python_lists.asp"]]
|
||||
card_description.update({"list-card" : [card_list_title, card_list_text, card_list_url]})
|
||||
|
||||
# Dictionnaire
|
||||
card_dict_title="Dictionnaire"
|
||||
card_dict_text="FIXME"
|
||||
card_dict_url=[["w3schools.com : dictionaries","https://www.w3schools.com/python/python_dictionaries.asp"]]
|
||||
card_dict_text=""" Une liste est une collection d"éléments. \n Elle est délimitée par des accolades, \n chaque valeur comporte une clé unique :
|
||||
dico = {'nom' : 'Haddock', 'prénom' : \n 'Archibald', 'année' : 1940} \n
|
||||
- dico[clé] : renvoie la valeur liée à la clé.
|
||||
- dico.update('domicile' : 'Moulinsart') : met \n à jour les paires de clé/valeur.
|
||||
- len(dico) : renvoie le nombre d"éléments.
|
||||
- list(dico) : renvoie la liste des clés.
|
||||
- dico.pop("année") : enlève la valeur associée \n à la clé."""
|
||||
card_dict_url=[
|
||||
["Doc. Python v3 Français : dict","https://docs.python.org/fr/3/library/stdtypes.html#mapping-types-dict"],
|
||||
["w3schools.com : dictionaries","https://www.w3schools.com/python/python_dictionaries.asp"]]
|
||||
card_description.update({"dict-card" : [card_dict_title, card_dict_text, card_dict_url]})
|
||||
|
||||
# Objet (POO)
|
||||
@ -127,9 +151,18 @@ card_sleep_title="Gestion du temps"
|
||||
card_sleep_text=" Vous pouvez créer des temporisations \n dans le déroulement du script.\n\n"
|
||||
card_sleep_text= card_sleep_text + " time.sleep(x) \n -> Marque d\"un temps d\"arrêt de \n x secondes.\n\n"
|
||||
card_sleep_text= card_sleep_text + " Il faudra préalablement importer la \n bibliothèque \'time\' avec \'import time\'."
|
||||
card_sleep_url=[["docs.python.org : sleep","https://docs.python.org/fr/3/library/time.html#time.sleep"]]
|
||||
card_sleep_url=[["Doc. Python v3 Fr : sleep","https://docs.python.org/fr/3/library/time.html#time.sleep"]]
|
||||
card_description.update({"sleep-card" : [card_sleep_title, card_sleep_text, card_sleep_url]})
|
||||
|
||||
# Python
|
||||
card_python_title="Langage Python"
|
||||
card_python_text=""" Le Python est un langage de programmation \n interprété open source. Python vise à être \n visuellement épuré avec une syntaxe \n clairement séparée des mécanismes de \n bas niveau.\n
|
||||
Python possède beaucoup de bibliothèques \n spécialisées. Multiplateformes et \n multiparadigme, il est utilisé dans de \n nombreux contextes : scriptage, calcul \n numérique, prototypage, enseignement, \n ou encore comme langage de commande \n pour de nombreux logiciels."""
|
||||
|
||||
card_python_url=[["python.org","https://python.org"], ["AFPy","https://www.afpy.org"]]
|
||||
card_description.update({"python-card" : [card_python_title, card_python_text, card_python_url]})
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Interface
|
||||
###############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user