<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.mchobby.be/index.php?action=history&amp;feed=atom&amp;title=FEATHER-CHARGER-MODULE-IMPORT</id>
	<title>FEATHER-CHARGER-MODULE-IMPORT - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mchobby.be/index.php?action=history&amp;feed=atom&amp;title=FEATHER-CHARGER-MODULE-IMPORT"/>
	<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;action=history"/>
	<updated>2026-09-09T16:10:12Z</updated>
	<subtitle>Historique des révisions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20891&amp;oldid=prev</id>
		<title>Admin le 11 novembre 2016 à 17:42</title>
		<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20891&amp;oldid=prev"/>
		<updated>2016-11-11T17:42:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 novembre 2016 à 17:42&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{FEATHER-CHARGER-MODULE-NAV}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{FEATHER-CHARGER-MODULE-NAV}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{traduction}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Importer un fichier de code ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Importer un fichier de code ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Comme pour une version standard de Python, vous pouvez importer et exécuter du code provenant de fichiers python dans votre script MicroPython. Cette approche est idéal pour décomposer un long script ou script complexe en des morceaux de codes plus petits. Cela permet de réutiliser ou partager du code entre plusieurs project. Cela facilite également le processus de maintenance.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Comme pour une version standard de Python, vous pouvez importer et exécuter du code provenant de fichiers python dans votre script MicroPython. Cette approche est idéal pour décomposer un long script ou script complexe en des morceaux de codes plus petits. Cela permet de réutiliser ou partager du code entre plusieurs project. Cela facilite également le processus de maintenance.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20890&amp;oldid=prev</id>
		<title>Admin : /* Les paquets (Packages) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20890&amp;oldid=prev"/>
		<updated>2016-11-11T17:42:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Les paquets (Packages)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 novembre 2016 à 17:42&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l132&quot; &gt;Ligne 132 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 132 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Vous devriez pouvoir importer le paquet/package et les fonctions fonctionner exactement comme vu ci-dessus!  Si vous constatez un message {{fname|ImportError}} indiquant que le module n'existe pas alors vérifiez que vous exécutez bien Python depuis le répertoire '''parent''' de votre répertoire du paquet/package &amp;quot;test&amp;quot;!&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Vous devriez pouvoir importer le paquet/package et les fonctions fonctionner exactement comme vu ci-dessus!  Si vous constatez un message {{fname|ImportError}} indiquant que le module n'existe pas alors vérifiez que vous exécutez bien Python depuis le répertoire '''parent''' de votre répertoire du paquet/package &amp;quot;test&amp;quot;!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Essayez maintenant de copier le paquet/package sur votre carte MicroPython et utilisez le exactement comme vous l'avez fait dans votre environnement PC. '''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Again make sure &lt;/del&gt;a test.py &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;file doesn't exist on the board or else &lt;/del&gt;MicroPython &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;will be confused about what to import&lt;/del&gt;'''!  &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If you have &lt;/del&gt;test.py &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;on your board already you can delete it using the following &lt;/del&gt;ampy &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;command&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Essayez maintenant de copier le paquet/package sur votre carte MicroPython et utilisez le exactement comme vous l'avez fait dans votre environnement PC. '''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Encore une fois, assurez-vous qu'il n'y &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pas de fichier &lt;/ins&gt;test.py &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sur la carte sinon &lt;/ins&gt;MicroPython &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ne saura pas lequel, du fichier &amp;quot;test.py&amp;quot; ou répertoire &amp;quot;test&amp;quot;, il faudra importer le code&lt;/ins&gt;'''!  &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Si vous avez déjà un fichier &lt;/ins&gt;test.py &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sur votre carte, vous pouvez l'effacer une utilisant une commande &lt;/ins&gt;ampy &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;comme celle-ci&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;ampy --port /board/serial/port rm test.py&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;ampy --port /board/serial/port rm test.py&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Now create the &lt;/del&gt;test &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;package directory in the root of the board&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Créons maintenant la paquet/package &lt;/ins&gt;test &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;en créant le répertoire &amp;quot;test&amp;quot; à la racine du système de fichier&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;ampy --port /board/serial/port mkdir test&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;ampy --port /board/serial/port mkdir test&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;And copy inside the three &lt;/del&gt;.py &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;files above that define the &lt;/del&gt;package (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;run these commands from &lt;/del&gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;inside&lt;/del&gt;''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/del&gt;test package &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;folder&lt;/del&gt;):&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Copions ensuite les 3 fichiers &lt;/ins&gt;.py &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;qui définissent le paquet/&lt;/ins&gt;package (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;voir ci-dessus) à &lt;/ins&gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;l&lt;/ins&gt;'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;intérieur&lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;' du répertoire &amp;quot;&lt;/ins&gt;test&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot; (donc à '''l'intérieur''' de notre paquet/&lt;/ins&gt;package):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;ampy --port /board/serial/port put __init__.py test/__init__.py&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;ampy --port /board/serial/port put __init__.py test/__init__.py&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l146&quot; &gt;Ligne 146 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 146 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ampy --port /board/serial/port put subtract.py test/subtract.py&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ampy --port /board/serial/port put subtract.py test/subtract.py&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;These commands will copy the &lt;/del&gt;.py &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;files to the &lt;/del&gt;test &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;folder on the board's filesystem&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; Use the &lt;/del&gt;{{fname|ls}} &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;command to double check there&lt;/del&gt;'&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;s a test folder with these three files on your board&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ces commande copierons les fichiers &lt;/ins&gt;.py &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;dans le répertoire &amp;quot;&lt;/ins&gt;test&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot; du système de fichier de la carte MicroPython&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Utilisez la commande &lt;/ins&gt;{{fname|ls}} &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pour vérifier la présence du répertoire {{fname|test}} et qu&lt;/ins&gt;'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;il contient les trois fichiers nécessaires&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;ampy --port /board/serial/port ls test&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;ampy --port /board/serial/port ls test&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l152&quot; &gt;Ligne 152 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 152 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ADFImage|FEATHER-CHARGER-MODULE-IMPORT-21.png}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ADFImage|FEATHER-CHARGER-MODULE-IMPORT-21.png}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Connect to the board&lt;/del&gt;'&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;s REPL and try importing the &lt;/del&gt;test &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;package and using its functions as before&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Connectez vous ensuite en REPL sur la carte et essayez d&lt;/ins&gt;'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;importer le paquet/package &lt;/ins&gt;test &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pour utiliser ses différentes fonctions (comme nous l'avons déjà fait)&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l162&quot; &gt;Ligne 162 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 162 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ADFImage|FEATHER-CHARGER-MODULE-IMPORT-22.png}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ADFImage|FEATHER-CHARGER-MODULE-IMPORT-22.png}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;You should see the &lt;/del&gt;package &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;import and the functions work exactly as before when they were in a single &lt;/del&gt;test.py &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;file&lt;/del&gt;!&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Vous devriez voir le paquet/&lt;/ins&gt;package &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;s'importer et les fonctions fonctionner exactement comme c'était le cas avec le fichier &lt;/ins&gt;test.py !&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Breaking a complex &lt;/del&gt;module &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;apart into multiple files with a &lt;/del&gt;package &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is a great way to simplify and &lt;/del&gt;structure code. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; In this &lt;/del&gt;simple &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;example it seems like a bit of unnecessary work&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;but as scripts get more complex and re-use common &lt;/del&gt;code &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it will help immensely to break them into modules and packages&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; You can even start to share code with others by giving them your modules and packages to load and use!&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Subdiviser un &lt;/ins&gt;module &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;complexe en plusieurs fichiers contenu dans un packet/&lt;/ins&gt;package &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;est une bonne façon de simplifier la &lt;/ins&gt;structure &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;du &lt;/ins&gt;code &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(et parfois le code lui-même). Dans cet exemple un peu simplicte nous avons déployé beaucoup de zèle (et de travail inutile)&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Dans le cas présent, le paquet/package est, au final, est &amp;quot;plus complexe&amp;quot; que le &lt;/ins&gt;simple &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;fichier &amp;quot;test.py&amp;quot;. Le but est avant tout de comprendre le fonctionnement d'un paquet/package&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;chose que vous trouverez utile lorsque vous voudrez réutiliser du &lt;/ins&gt;code&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, le partager, ou en réduire la complexité&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{FEATHER-CHARGER-MODULE-TRAILER}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{FEATHER-CHARGER-MODULE-TRAILER}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20889&amp;oldid=prev</id>
		<title>Admin : /* Les paquets (Packages) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20889&amp;oldid=prev"/>
		<updated>2016-11-11T17:12:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Les paquets (Packages)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 novembre 2016 à 17:12&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l130&quot; &gt;Ligne 130 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 130 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ADFImage|FEATHER-CHARGER-MODULE-IMPORT-20.png}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ADFImage|FEATHER-CHARGER-MODULE-IMPORT-20.png}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;You should see the &lt;/del&gt;package &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;imported and the functions work exactly as you saw before&lt;/del&gt;!  &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If you see an &lt;/del&gt;ImportError &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;that the test &lt;/del&gt;module &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;doesn't exist be sure you&lt;/del&gt;'&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;re running &lt;/del&gt;Python &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;from the &lt;/del&gt;'''parent''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;of the &lt;/del&gt;test &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;package directory&lt;/del&gt;!&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Vous devriez pouvoir importer le paquet/&lt;/ins&gt;package &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;et les fonctions fonctionner exactement comme vu ci-dessus&lt;/ins&gt;!  &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Si vous constatez un message {{fname|&lt;/ins&gt;ImportError&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;}} indiquant que le &lt;/ins&gt;module &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;n&lt;/ins&gt;'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;existe pas alors vérifiez que vous exécutez bien &lt;/ins&gt;Python &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;depuis le répertoire &lt;/ins&gt;'''parent''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;de votre répertoire du paquet/package &amp;quot;&lt;/ins&gt;test&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&lt;/ins&gt;!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Now try copying the &lt;/del&gt;package &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to your &lt;/del&gt;MicroPython &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;board and using it exactly as you did with desktop Python&lt;/del&gt;. '''Again make sure a test.py file doesn't exist on the board or else MicroPython will be confused about what to import'''!  If you have test.py on your board already you can delete it using the following ampy command:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Essayez maintenant de copier le paquet/&lt;/ins&gt;package &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sur votre carte &lt;/ins&gt;MicroPython &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;et utilisez le exactement comme vous l'avez fait dans votre environnement PC&lt;/ins&gt;. '''Again make sure a test.py file doesn't exist on the board or else MicroPython will be confused about what to import'''!  If you have test.py on your board already you can delete it using the following ampy command:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;ampy --port /board/serial/port rm test.py&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;nowiki&amp;gt;ampy --port /board/serial/port rm test.py&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20888&amp;oldid=prev</id>
		<title>Admin : /* Les paquets (Packages) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20888&amp;oldid=prev"/>
		<updated>2016-11-11T15:56:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Les paquets (Packages)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 novembre 2016 à 15:56&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l107&quot; &gt;Ligne 107 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 107 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction '''{{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}''', nous importons donc une fonction '''&amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''' depuis le fichier '''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add.py&amp;lt;/font&amp;gt;''' se trouvant dans le répertoire &amp;quot;'''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;'''&amp;quot; (comme stipulé par '''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''').  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction '''{{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}''', nous importons donc une fonction '''&amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''' depuis le fichier '''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add.py&amp;lt;/font&amp;gt;''' se trouvant dans le répertoire &amp;quot;'''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;'''&amp;quot; (comme stipulé par '''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''').  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Dans le script {{fname|__init__.py}}, vous {{underline|ne pourrez pas exécuter une commande}} tel que &amp;quot;'''from add import add'''&amp;quot; étant donné que cette instruction est totalement confuse pour Python. En effet, il essayera de charger la fonction {{fname|add}} depuis le module add.py (le fichier add.py) se trouvant dans le même répertoire où est exécuté le script principal (''comme expliqué en début de cette section'')&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;. {{traduction}}&lt;/del&gt;.  &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Using the full name &lt;/del&gt;'''test.add''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tells &lt;/del&gt;Python &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to use the &lt;/del&gt;'''add.py''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;module inside the &lt;/del&gt;'''test''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;package directory&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Dans le script {{fname|__init__.py}}, vous {{underline|ne pourrez pas exécuter une commande}} tel que &amp;quot;'''from add import add'''&amp;quot; étant donné que cette instruction est totalement confuse pour Python. En effet, il essayera de charger la fonction {{fname|add}} depuis le module add.py (le fichier add.py) se trouvant dans le même répertoire où est exécuté le script principal (''comme expliqué en début de cette section'').  &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;En utilisant le nom complet &lt;/ins&gt;'''test.add''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;nous indiquons à &lt;/ins&gt;Python &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;d'utiliser le fichier/module &lt;/ins&gt;'''add.py''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;à l'intérieur du répertoire paquet/package &lt;/ins&gt;'''test''' .&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Double check you have a &lt;/del&gt;test &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;package &lt;/del&gt;structure &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;that looks like the following&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Vérifiez que le paquet/package &lt;/ins&gt;test &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;soit confirme avec la &lt;/ins&gt;structure &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;suivant&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''test''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;directory&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Répertoire &lt;/ins&gt;'''test'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** '''__init__.py''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;file which imports the &lt;/del&gt;add &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and subtract functions&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Le fichier &lt;/ins&gt;'''__init__.py''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;qui importe les fonctions {{fname|&lt;/ins&gt;add&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;()}} et {{fname|substract()}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** '''add.py''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which exposes the &lt;/del&gt;add &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;function&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Le fichier &lt;/ins&gt;'''add.py''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;qui expose la fonction {{fname|&lt;/ins&gt;add&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;()}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** '''subtract.py''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which exposes the &lt;/del&gt;subtract &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;function&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Le fichier &lt;/ins&gt;'''subtract.py''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;qui expose la fonction {{fname|&lt;/ins&gt;subtract&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;()}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Now try importing and using the &lt;/del&gt;package &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;with desktop &lt;/del&gt;Python. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; In a &lt;/del&gt;terminal &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;navigate to the &lt;/del&gt;'''parent &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;of the &lt;/del&gt;test package &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;directory&lt;/del&gt;''' (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;i&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;e. one folder above it&lt;/del&gt;). &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; Importing and using a &lt;/del&gt;package &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is just like importing a &lt;/del&gt;.py &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;file however &lt;/del&gt;Python &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;treats the entire &lt;/del&gt;test &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;directory as the &lt;/del&gt;package &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;itself&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; This means you need to run &lt;/del&gt;Python &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;from above the &lt;/del&gt;test &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;directory so &lt;/del&gt;Python &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;can find the package&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Essayez maintenant d'importer et d'utiliser le paquet/&lt;/ins&gt;package &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;avec la version PC de &lt;/ins&gt;Python. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Utilisez un &lt;/ins&gt;terminal &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;et naviguez jusqu'au répertoire &lt;/ins&gt;'''parent &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;du répertoire &amp;quot;&lt;/ins&gt;test&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot; contenant notre paquet/&lt;/ins&gt;package''' (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ex&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;le répertoire juste avant le répertoire &amp;quot;test&amp;quot;&lt;/ins&gt;). &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Importer et utiliser un paquet/&lt;/ins&gt;package &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;se fait de façon identique à l'importation d'un fichier &lt;/ins&gt;.py&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, cependant &lt;/ins&gt;Python &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;traitera le répertoire ''&lt;/ins&gt;test&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'' entier comme le paquet/&lt;/ins&gt;package &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;lui-même&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Cela signifie surtout que vous aurez besoin d'exécuter &lt;/ins&gt;Python &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;depuis le répertoire parent du répertoire &amp;quot;''&lt;/ins&gt;test&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''&amp;quot; (et &lt;/ins&gt;Python &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sera capable de trouver le paquet)&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Also note be sure you don't have a &lt;/del&gt;test.py &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;file in the same directory as the &lt;/del&gt;test &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;package&lt;/del&gt;'''! &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; If you do &lt;/del&gt;Python &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;could get confused and import the &lt;/del&gt;test.py &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;file instead of the &lt;/del&gt;test &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;package&lt;/del&gt;.  &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Delete &lt;/del&gt;test.py &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;if it exists next to the &lt;/del&gt;test &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;package folder&lt;/del&gt;!&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Assurez-vous de ne pas avoir un fichier &lt;/ins&gt;test.py &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;et un paquet/package (répertoire) &lt;/ins&gt;test''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;dans le même répertoire&lt;/ins&gt;! &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Sinon &lt;/ins&gt;Python &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ne s’emmêlera les pinceaux et importera le fichier/module &lt;/ins&gt;test.py &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;à la place du paquet/package &amp;quot;&lt;/ins&gt;test&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&lt;/ins&gt;.  &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Effacez le fichier &amp;quot;&lt;/ins&gt;test.py&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot; s'il existe un paquet/package &lt;/ins&gt;test &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;dans le même répertoire&lt;/ins&gt;!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Run the following &lt;/del&gt;code &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in the Python &lt;/del&gt;REPL &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to import and use the &lt;/del&gt;add &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and subtract functions from the test &lt;/del&gt;package:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Exécutez le &lt;/ins&gt;code &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;suivant dans une invite &lt;/ins&gt;REPL &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;de votre carte MicroPython pour importer et utiliser les fonctions {{fname|&lt;/ins&gt;add&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;()}} et {{fname|substract()}} disponibles dans le paquet/&lt;/ins&gt;package:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20887&amp;oldid=prev</id>
		<title>Admin : /* Les paquets (Packages) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20887&amp;oldid=prev"/>
		<updated>2016-11-11T13:27:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Les paquets (Packages)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 novembre 2016 à 13:27&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l107&quot; &gt;Ligne 107 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 107 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction '''{{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}''', nous importons donc une fonction '''&amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''' depuis le fichier '''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add.py&amp;lt;/font&amp;gt;''' se trouvant dans le répertoire &amp;quot;'''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;'''&amp;quot; (comme stipulé par '''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''').  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction '''{{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}''', nous importons donc une fonction '''&amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''' depuis le fichier '''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add.py&amp;lt;/font&amp;gt;''' se trouvant dans le répertoire &amp;quot;'''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;'''&amp;quot; (comme stipulé par '''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''').  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Dans le script {{fname|__init__.py}}, vous {{underline|ne pourrez pas exécuter une commande}} tel que &amp;quot;'''from add import add'''&amp;quot; étant donné que cette instruction est totalement confuse pour Python. En effet, il essayera de charger la fonction {{fname|add}} depuis le module add.py (le fichier add.py) se trouvant dans le répertoire &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;courant ou &lt;/del&gt;est exécuté le script (''comme expliqué en début de cette section''). {{traduction}}.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Dans le script {{fname|__init__.py}}, vous {{underline|ne pourrez pas exécuter une commande}} tel que &amp;quot;'''from add import add'''&amp;quot; étant donné que cette instruction est totalement confuse pour Python. En effet, il essayera de charger la fonction {{fname|add}} depuis le module add.py (le fichier add.py) se trouvant dans le &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;même &lt;/ins&gt;répertoire &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;où &lt;/ins&gt;est exécuté le script &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;principal &lt;/ins&gt;(''comme expliqué en début de cette section''). {{traduction}}.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Double check you have a test package structure that looks like the following:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Double check you have a test package structure that looks like the following:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20886&amp;oldid=prev</id>
		<title>Admin : /* Les paquets (Packages) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20886&amp;oldid=prev"/>
		<updated>2016-11-11T13:25:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Les paquets (Packages)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 novembre 2016 à 13:25&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot; &gt;Ligne 105 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 105 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notez que l'instruction d'importation référence le fichier '''add.py''' en utilisant un &amp;quot;''nom d'importation absolu''&amp;quot;. Par exemple, le fonction add est importée depuis '''test.add'''.  Le 'test.' est le nom du paquet/package, par exemple: le nom du répertoire du paquet/package. Le 'add' derrière le 'test.add' est le nom du fichier python (add.py) où l'interpréteur Python trouvera la fonction à importer.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notez que l'instruction d'importation référence le fichier '''add.py''' en utilisant un &amp;quot;''nom d'importation absolu''&amp;quot;. Par exemple, le fonction add est importée depuis '''test.add'''.  Le 'test.' est le nom du paquet/package, par exemple: le nom du répertoire du paquet/package. Le 'add' derrière le 'test.add' est le nom du fichier python (add.py) où l'interpréteur Python trouvera la fonction à importer.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction '''{{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}''', nous importons donc une fonction '''&amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''' depuis le fichier '''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add.py&amp;lt;/font&amp;gt;''' se trouvant dans le répertoire &amp;quot;'''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;'''&amp;quot; (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;le &lt;/del&gt;'''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''').  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction '''{{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}''', nous importons donc une fonction '''&amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''' depuis le fichier '''&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add.py&amp;lt;/font&amp;gt;''' se trouvant dans le répertoire &amp;quot;'''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;'''&amp;quot; (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;comme stipulé par &lt;/ins&gt;'''&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt;''').  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Vous   You can't run a command like &lt;/del&gt;&amp;quot;'''from add import add'''&amp;quot; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in the __init__&lt;/del&gt;.py &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;since Python would get confused if it should load an &lt;/del&gt;add.py &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;from inside the module or from elsewhere&lt;/del&gt;.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Dans le script {{fname|__init__.py}}, vous {{underline|ne pourrez pas exécuter une commande}} tel que &lt;/ins&gt;&amp;quot;'''from add import add'''&amp;quot; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;étant donné que cette instruction est totalement confuse pour Python. En effet, il essayera de charger la fonction {{fname|add}} depuis le module add&lt;/ins&gt;.py &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(le fichier &lt;/ins&gt;add.py&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;) se trouvant dans le répertoire courant ou est exécuté le script (''comme expliqué en début de cette section''). {{traduction}}&lt;/ins&gt;.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Double check you have a test package structure that looks like the following:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Double check you have a test package structure that looks like the following:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20885&amp;oldid=prev</id>
		<title>Admin : /* Les paquets (Packages) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20885&amp;oldid=prev"/>
		<updated>2016-11-11T13:19:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Les paquets (Packages)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 novembre 2016 à 13:19&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot; &gt;Ligne 105 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 105 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notez que l'instruction d'importation référence le fichier '''add.py''' en utilisant un &amp;quot;''nom d'importation absolu''&amp;quot;. Par exemple, le fonction add est importée depuis '''test.add'''.  Le 'test.' est le nom du paquet/package, par exemple: le nom du répertoire du paquet/package. Le 'add' derrière le 'test.add' est le nom du fichier python (add.py) où l'interpréteur Python trouvera la fonction à importer.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notez que l'instruction d'importation référence le fichier '''add.py''' en utilisant un &amp;quot;''nom d'importation absolu''&amp;quot;. Par exemple, le fonction add est importée depuis '''test.add'''.  Le 'test.' est le nom du paquet/package, par exemple: le nom du répertoire du paquet/package. Le 'add' derrière le 'test.add' est le nom du fichier python (add.py) où l'interpréteur Python trouvera la fonction à importer.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction '''{{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}''', nous importons donc une fonction '''add''' depuis le fichier ''add.py'' se trouvant dans le ''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;répertoire &lt;/del&gt;&amp;quot;test&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&lt;/del&gt;'' (le &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&lt;/del&gt;''test.add''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&lt;/del&gt;).  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction '''{{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}''', nous importons donc une fonction '''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;&lt;/ins&gt;add&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/font&amp;gt;&lt;/ins&gt;''' depuis le fichier ''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;&lt;/ins&gt;add.py&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/font&amp;gt;'&lt;/ins&gt;'' se trouvant dans le &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;répertoire &amp;quot;&lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'&amp;lt;font color=&amp;quot;teal&lt;/ins&gt;&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&lt;/ins&gt;test&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/font&amp;gt;'&lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot; &lt;/ins&gt;(le ''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'&amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;&lt;/ins&gt;test&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/font&amp;gt;&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;&lt;/ins&gt;add&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/font&amp;gt;'&lt;/ins&gt;'').  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Vous   You can't run a command like &amp;quot;'''from add import add'''&amp;quot; in the __init__.py since Python would get confused if it should load an add.py from inside the module or from elsewhere.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Vous   You can't run a command like &amp;quot;'''from add import add'''&amp;quot; in the __init__.py since Python would get confused if it should load an add.py from inside the module or from elsewhere.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20884&amp;oldid=prev</id>
		<title>Admin : /* Les paquets (Packages) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20884&amp;oldid=prev"/>
		<updated>2016-11-11T13:16:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Les paquets (Packages)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 novembre 2016 à 13:16&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot; &gt;Ligne 105 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 105 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notez que l'instruction d'importation référence le fichier '''add.py''' en utilisant un &amp;quot;''nom d'importation absolu''&amp;quot;. Par exemple, le fonction add est importée depuis '''test.add'''.  Le 'test.' est le nom du paquet/package, par exemple: le nom du répertoire du paquet/package. Le 'add' derrière le 'test.add' est le nom du fichier python (add.py) où l'interpréteur Python trouvera la fonction à importer.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notez que l'instruction d'importation référence le fichier '''add.py''' en utilisant un &amp;quot;''nom d'importation absolu''&amp;quot;. Par exemple, le fonction add est importée depuis '''test.add'''.  Le 'test.' est le nom du paquet/package, par exemple: le nom du répertoire du paquet/package. Le 'add' derrière le 'test.add' est le nom du fichier python (add.py) où l'interpréteur Python trouvera la fonction à importer.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction '''{{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;dark &lt;/del&gt;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;Orange &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Red&lt;/del&gt;&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}''', nous importons donc une fonction '''add''' depuis le fichier ''add.py'' se trouvant dans le ''répertoire &amp;quot;test&amp;quot;'' (le &amp;quot;''test.add''&amp;quot;).  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction '''{{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;Orange&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}''', nous importons donc une fonction '''add''' depuis le fichier ''add.py'' se trouvant dans le ''répertoire &amp;quot;test&amp;quot;'' (le &amp;quot;''test.add''&amp;quot;).  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Vous   You can't run a command like &amp;quot;'''from add import add'''&amp;quot; in the __init__.py since Python would get confused if it should load an add.py from inside the module or from elsewhere.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Vous   You can't run a command like &amp;quot;'''from add import add'''&amp;quot; in the __init__.py since Python would get confused if it should load an add.py from inside the module or from elsewhere.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20883&amp;oldid=prev</id>
		<title>Admin : /* Les paquets (Packages) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20883&amp;oldid=prev"/>
		<updated>2016-11-11T13:16:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Les paquets (Packages)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 novembre 2016 à 13:16&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot; &gt;Ligne 105 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 105 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notez que l'instruction d'importation référence le fichier '''add.py''' en utilisant un &amp;quot;''nom d'importation absolu''&amp;quot;. Par exemple, le fonction add est importée depuis '''test.add'''.  Le 'test.' est le nom du paquet/package, par exemple: le nom du répertoire du paquet/package. Le 'add' derrière le 'test.add' est le nom du fichier python (add.py) où l'interpréteur Python trouvera la fonction à importer.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notez que l'instruction d'importation référence le fichier '''add.py''' en utilisant un &amp;quot;''nom d'importation absolu''&amp;quot;. Par exemple, le fonction add est importée depuis '''test.add'''.  Le 'test.' est le nom du paquet/package, par exemple: le nom du répertoire du paquet/package. Le 'add' derrière le 'test.add' est le nom du fichier python (add.py) où l'interpréteur Python trouvera la fonction à importer.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction {{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Chocolate&lt;/del&gt;&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}, nous importons donc une fonction '''add''' depuis le fichier ''add.py'' se trouvant dans le ''répertoire &amp;quot;test&amp;quot;'' (le &amp;quot;''test.add''&amp;quot;).  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;{{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;dark &lt;/ins&gt;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Orange Red&lt;/ins&gt;&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;, nous importons donc une fonction '''add''' depuis le fichier ''add.py'' se trouvant dans le ''répertoire &amp;quot;test&amp;quot;'' (le &amp;quot;''test.add''&amp;quot;).  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Vous   You can't run a command like &amp;quot;'''from add import add'''&amp;quot; in the __init__.py since Python would get confused if it should load an add.py from inside the module or from elsewhere.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Vous   You can't run a command like &amp;quot;'''from add import add'''&amp;quot; in the __init__.py since Python would get confused if it should load an add.py from inside the module or from elsewhere.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20882&amp;oldid=prev</id>
		<title>Admin : /* Les paquets (Packages) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.mchobby.be/index.php?title=FEATHER-CHARGER-MODULE-IMPORT&amp;diff=20882&amp;oldid=prev"/>
		<updated>2016-11-11T13:14:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Les paquets (Packages)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 11 novembre 2016 à 13:14&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot; &gt;Ligne 105 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 105 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notez que l'instruction d'importation référence le fichier '''add.py''' en utilisant un &amp;quot;''nom d'importation absolu''&amp;quot;. Par exemple, le fonction add est importée depuis '''test.add'''.  Le 'test.' est le nom du paquet/package, par exemple: le nom du répertoire du paquet/package. Le 'add' derrière le 'test.add' est le nom du fichier python (add.py) où l'interpréteur Python trouvera la fonction à importer.  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notez que l'instruction d'importation référence le fichier '''add.py''' en utilisant un &amp;quot;''nom d'importation absolu''&amp;quot;. Par exemple, le fonction add est importée depuis '''test.add'''.  Le 'test.' est le nom du paquet/package, par exemple: le nom du répertoire du paquet/package. Le 'add' derrière le 'test.add' est le nom du fichier python (add.py) où l'interpréteur Python trouvera la fonction à importer.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction {{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;brown&lt;/del&gt;&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}, nous importons donc une fonction '''add''' depuis le fichier ''add.py'' se trouvant dans le ''répertoire &amp;quot;test&amp;quot;'' (le &amp;quot;''test.add''&amp;quot;).  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Suivant l'instruction {{fname|1=from &amp;lt;font color=&amp;quot;teal&amp;quot;&amp;gt;test&amp;lt;/font&amp;gt;.&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; import &amp;lt;font color=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Chocolate&lt;/ins&gt;&amp;quot;&amp;gt;add&amp;lt;/font&amp;gt; }}, nous importons donc une fonction '''add''' depuis le fichier ''add.py'' se trouvant dans le ''répertoire &amp;quot;test&amp;quot;'' (le &amp;quot;''test.add''&amp;quot;).  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Vous   You can't run a command like &amp;quot;'''from add import add'''&amp;quot; in the __init__.py since Python would get confused if it should load an add.py from inside the module or from elsewhere.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Vous   You can't run a command like &amp;quot;'''from add import add'''&amp;quot; in the __init__.py since Python would get confused if it should load an add.py from inside the module or from elsewhere.  Using the full name '''test.add''' tells Python to use the '''add.py''' module inside the '''test''' package directory.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>