Very unusually, I'm posting rather than asking for help this time! (although I'm not sure I would rely on this, and/or it may have been mentioned before).
I have a raspberry pi with various sensors, which I wanted to feed into node red.
The data from these sensors is collected and manipulated by python scripts.
I was looking for the best way to send the data from these scripts to node red (there seems to be tons of options, MQTT being the most straight forward).
But, all I did is use the Exec node to call the script and then used the Stdout output of the Exec node to get the values.
This removes the need for any extra layer to communicate between python and node red, but also makes the python scripts very simple - because all you need to do is print the values you want.
It also allows you to get values in real time without having to wait until the script finishes.