[wingide-users] Odd problem

Lawson English lenglish5 at cox.net
Sat Dec 1 16:21:05 MST 2007

Hi, I'm currently using the Wing IDE 101 and I've run into a strange 

I'm logging into a game server (Second Life) and trying to send UDP 
packets. I can do the login process just fine and retreive the 
appropriate info, but when I attempt to start communicating with the 
server using UDP, I get... nothing. Not eve debug print statements as 

The offending code follows. If I comment out the last few lines, I get 
all my print out put. If I don't comment out the last few lines, I get 
nothing. I suspect I'm not forming my packets properly but that is (or 
should be) a separate issue from getting no output at all, even from a 
print at the very top of the script (e.g. 'print "host"'). Is this an 
issue with the 101 teaching IDE, and issue with the IDE in general, or 
something odd about my code?

# appropriate login data has already been received and placed in a 
dictionary called "result"

host = result["sim_ip"]
print host
port = result["sim_port"]
circuit_code = result["circuit_code"]
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
print "before data"
#Sending packet UseCircuitCode <-- Inits the connection to the sim.
data = pack('>BLBL',0x40,01,00,0xffff0003) + pack('<L',circuit_code) + 
uuid.UUID(result["secure_session_id"]).bytes_le + 
print "test" ; print
print ByteToHex(data)
sock.sendto(data, (host, port))
print "test"
print "test"
print "test"
#Comment this last part out and all print statements show output. Leave 
the following lines uncommented and no output at all
buf = 100
#Receive messages
while 1:
    data,addr = sock.recvfrom(buf)
    if not data:
        print "Client has exited!"
        print "\nReceived message '", data,"'"
# Close socket

More information about the wingide-users mailing list