dsl il fau je je programme la page html, la je fais le script et puis je coderai la page
voila se ke jai fai
- On importe socket..
from socket import *
- Variables
host = "localhost"
port = 2074
buf = 1024
addr = (host,port)
- On fait le socket
UDPSock = socket(AF_INET,SOCK_DGRAM)
def_msg = "Message?"
print "\n",def_msg
- Envois du message
while (1):
data = raw_input(´>> ´)
if not data:
break
else:
if(UDPSock.sendto(data,addr)):
print "Envois de: ´",data,"´ ... <ok>"
- On ferme tout
UDPSock.close()
- -------------------------
- Le serveur (chat)
- Importe socket..
from socket import *
- Variables, cest important ..
host = "localhost"
port = 2074
buf = 1024
addr = (host,port)
- On fait le socket
- et bind l´addresse
UDPSock = socket(AF_INET,SOCK_DGRAM)
UDPSock.bind(addr)
- Le type sur le forum recois le message
while 1:
data,addr = UDPSock.recvfrom(buf)
if not data:
print "Le client a quitte"
break
else:
print "\nRecu: ´",data,"´"
- On ferme tout ca
UDPSock.close()
c´est du bon boulot non ? 
cest le chat 