Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- s = socket.socket()
- s.connect(("localhost", 9999))
- nombre = raw_input("cual es su nick?: ")
- s.send(nombre)
- while True:
- mensaje = raw_input(nombre + " >> ")
- s.send(mensaje)
- if mensaje == "quit":
- s.send("adios")
- break
- resp = s.recv(1024)
- print resp
- print "adios"
- s.close()
Advertisement
Add Comment
Please, Sign In to add comment