Read / Write image file

codecraig codecraig at gmail.com
Tue May 3 15:06:20 EDT 2005


By the way, what is 'rb' and 'wb' ?

Also, when I create a client/server sockets I do something like...

SERVER
-----------
server.bind(('', 4321))
(sock, addr) = server.accept()
x = server.recv(1024)

CLIENT
------------
client.connect(('localhost', 4321))
x = open("abc.txt", "rb")
client.send(x)
client.close()
x.close()

...when I do this I get a constant beeping on my PC, any idea why?
Also, on the server ...how can I set that up so I can receive a
file/data of unknown size instead of just 1024?

thanks




More information about the Python-list mailing list