Outils pour utilisateurs

Outils du site


start:raspberry:nodered:python

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
start:raspberry:nodered:python [2025/01/29 11:05] – [Installation d'un noeud Python-Fonction] adminstart:raspberry:nodered:python [2025/02/03 17:08] (Version actuelle) – [Utilisation de python dans node-red] admin
Ligne 1: Ligne 1:
 ======== Installation python dans node-red ======== ======== Installation python dans node-red ========
 +
 +[[https://flows.nodered.org/search?term=python| Librairie Python pour Node-red EN ]]
  
 ====installation de python-shell==== ====installation de python-shell====
  
     sudo npm install node-red-contrib-python-shell     sudo npm install node-red-contrib-python-shell
 +== Usage ==
  
 +Exécution d'un script Python depuis node-red. L'entrée du nœud deviendra l'argument du script Python, la sortie du script sera envoyée à la sortie du nœud.
 +
 +L'exécution dans un environnement virtuel est désormais prise en charge. Spécifiez le chemin d'accès au dossier virtualenv dans la configuration du nœud.    
 +
 +==Exemple de script Python ==
 +
 +Et voici le contenu du script python :
 +
 +<code python exemple002.py>
 +
 +import sys
 +print "Got arguments: ", sys.argv
 +</code>
 ==== Installation d'un noeud Python-Fonction ==== ==== Installation d'un noeud Python-Fonction ====
       sudo npm install node-red-contrib-python-function-ps --save       sudo npm install node-red-contrib-python-function-ps --save
-       
 ==Usage== ==Usage==
  
Ligne 25: Ligne 40:
 return msg return msg
 </code> </code>
 +
 +===== Utilisation de python dans node-red =====
 +
 +[[https://flowfuse.com/blog/2024/07/calling-python-script-from-node-red/|Script Python et Node-Red EN ]]
 +
 +[[https://funprojects.blog/2023/10/26/mix-node-red-and-python/|Mixez Python et Node-red avec un Robot piloter via un Raspberry EN]]
/home/chanteri/www/fablab37110/data/attic/start/raspberry/nodered/python.1738145111.txt.gz · Dernière modification : 2025/01/29 11:05 de admin