All pastes #363786 Raw Edit

Stuff

public text v1 · immutable
#363786 ·published 2007-02-19 17:56 UTC
rendered paste body
import socket
import sys
empty ="initialized !"


while  empty != 'quit' :

    empty = sys.stdin.readline()
    host = 'localhost'
    port = 50000
    size = 2048
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((host,port))
    s.send("NEW: \n")
    if empty == 'lala\n':
    	s.send(empty)
    if empty == 'quit\n':
        s.send(empty)
		
	
#    s.send(empty)
#    data = s.recv(size)
    s.close()
    print 'Received:', data