This is a complete and detailed module to easily communicate a Python script with a Node app, using socket.io.
App works as server and client, and on localhost or any IP.
Python app depends on python-socketio and python-socketio["client"]. Node app depends on express, socket.io and socket.io-client.
On Python folder:
python -m virtualenv .
pip install python-socketio python-socketio["client"]
On Node folder:
npm install -i express socket.io socket.io-client
Each function and method is explained as comments before code.