title: python udp socket from batch-file
body: <p>I've a simple code to send a UDP packet to a UDP server.
  It works on my Linux Ubuntu machine. 
  It also works on my Windows 7 computer running python 2.6.6 via PythonWin or PythonIDE, but when trying to run from a the command shell or batch file it do not work.</p>
  
  <p>I write </p>
  
  <pre><code>[full patch]\python.exe [full path]\cl.py
  </code></pre>
  
  <p>and the program run, print statements work but no UDP packet is sent. (checked with WireShark on the windows machine) No other error is indicated.</p>
  
  <p>Is there something special to consider for running from command prompt or batch file?</p>
  
  <pre><code>#!/usr/bin/python
  import socket
  
  port = 12345
  ip = "10.30.5.70"
  data = "Hello World"
  
  UDPSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  UDPSock.sendto(data, (ip,port))
  print "done."
  </code></pre>