title: Opening socket to outside computer with Python
body: <p>I am using the following code to open a socket on my computer.  When I go to my_ip:5000 on my computer the program responds.  However, when I use another computer, nothing happens.  </p>
  
  <pre><code>HOST = 'my_ip'                 # Symbolic name meaning the local host
  PORT = 8000              # Arbitrary non-privileged port
  s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  s.bind((HOST, PORT))
  s.listen(1)
  conn, addr = s.accept()
  print 'Connected by', addr
  while 1:
      data = conn.recv(1024)
      if not data: break
      conn.send(data)
  conn.close()
  </code></pre>
  
  <p>I'm not sure if this is an issue with the firewall or not.  When I start up the test server in django using <code>manage.py runserver my_ip:8000</code> I am able to connect to the machine from a different computer.  I'm not sure what is causing me not to be able to connect from another computer using the code above...</p>