Modifications

Sauter à la navigation Sauter à la recherche
141 octets ajoutés ,  11 novembre 2016 à 17:12
Ligne 130 : Ligne 130 :  
{{ADFImage|FEATHER-CHARGER-MODULE-IMPORT-20.png}}
 
{{ADFImage|FEATHER-CHARGER-MODULE-IMPORT-20.png}}
   −
You should see the package imported and the functions work exactly as you saw beforeIf you see an ImportError that the test module doesn't exist be sure you're running Python from the '''parent''' of the test package directory!
+
Vous devriez pouvoir importer le paquet/package et les fonctions fonctionner exactement comme vu ci-dessusSi 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 "test"!
   −
Now try copying the package to your MicroPython board and using it exactly as you did with desktop Python. '''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:
+
Essayez maintenant de copier le paquet/package sur votre carte MicroPython et utilisez le exactement comme vous l'avez fait dans votre environnement PC. '''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:
    
  <nowiki>ampy --port /board/serial/port rm test.py</nowiki>
 
  <nowiki>ampy --port /board/serial/port rm test.py</nowiki>
29 922

modifications

Menu de navigation