View Single Post
  #1  
Old 12-20-2010, 03:54 AM
psykoko psykoko is offline
Member
 
Join Date: Dec 2010
Posts: 9
continue loading...

HI.
i am received udp signal from matalb successfuly. throught following coding
Code:
import socket
import struct
viz.go()
UDP_IP="localhost"
UDP_PORT=8020

sock = socket.socket( socket.AF_INET, # Internet
socket.SOCK_DGRAM ) # UDP
sock.bind( (UDP_IP,UDP_PORT) )
while True:
      data, addr = sock.recvfrom( 1024 ) # buffer size is 1024 bytes
      udp = struct.unpack(">d", data)[0]
      right = open('c:\ownership\Hand2.txt', 'a+')
      right.write(str(udp)+'n') 
True.close()


but i have any problem.
this code seems to continue loading screen.

how can solve this problem??
Reply With Quote