stog #7130(2008/08/15 12:20 GMT) [ Python ] Rating0/0=0.00
$ python client_echo.py localhost 7 < input_file > result_file
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/python # -*- coding: utf8 -*- import sys, socket host, port = sys.argv[1:3] s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, int(port))) sf = s.makefile() for line in sys.stdin: sf.write(line) sf.flush() print sf.readline(),
Rating0/0=0.00-0+
[ reply ]
stog
#7130()
[
Python
]
Rating0/0=0.00
$ python client_echo.py localhost 7 < input_file > result_file
Rating0/0=0.00-0+
[ reply ]