repo.or.cz
/
python.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Issue #3726: Allowed spaces in separators in logging configuration files.
[python.git]
/
Demo
/
sockets
/
unixclient.py
blob
fdbcc7aec1e95320f88953e75016fc4a2b4b00f4
1
# Echo client demo using Unix sockets
2
# Piet van Oostrum
3
4
from
socket
import
*
5
6
FILE
=
'unix-socket'
7
s
=
socket
(
AF_UNIX
,
SOCK_STREAM
)
8
s
.
connect
(
FILE
)
9
s
.
send
(
'Hello, world'
)
10
data
=
s
.
recv
(
1024
)
11
s
.
close
()
12
print
'Received'
,
repr
(
data
)