Message 17464 - Python tracker (original) (raw)
Logged In: YES user_id=44345
I modified the Demo/sockets/unixclient.py script to the following:
Echo client demo using Unix sockets
Piet van Oostrum
from socket import *
FILE = 'blabla'
s = socket(AF_UNIX, SOCK_STREAM)
s.connect(FILE)
import cPickle
f = s.makefile("wb")
cPickle.dump("Hello, world", f)
f.close()
#s.send('Hello, world')
data = s.recv(1024)
s.close()
print 'Received', data
It seemed to work fine when connected to the corresponding unixserver.py script.