title: Connecting Python to a webpage via node-red
body: <p>I am trying to take info from my python program and update this real time on the web page.</p>
  
  <p>I am trying to use node-red and communicate via web sockets.</p>
  
  <p>My python program is below:</p>
  
  <pre><code>#!/usr/bin/python
  
  import time
  
  import websocket
  ws = websocket.WebSocket();
  ws.connect("ws://localhost:1880/ws/example")
  count = 0;
  while(count &lt; 50):
          print "Sending 'Hello, World'..."
          ws.send("Hello, World")
          print "Sent"
          time.sleep(5)
          count = count + 1
  
   ws.close()
  </code></pre>
  
  <p>Using Node-red I have set up my flow as follows:</p>
  
  <p><a href="http://i.stack.imgur.com/PJOOK.png" rel="nofollow">Node-Red Flow</a></p>
  
  <p>However when I run them both, my python program says it is sending the message, however the node red console is returning null for the msg value.</p>