Created
September 10, 2013 08:57
-
-
Save hagun/6506776 to your computer and use it in GitHub Desktop.
stdin을 읽어서 tcp socket으로 전송. python버전
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import sys | |
| import socket | |
| HOST = '192.168.161.117' | |
| PORT = 4333 | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.connect((HOST, PORT)) | |
| for line in sys.stdin: | |
| s.send(line) | |
| s.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment