]> git.llucax.com Git - software/pymin.git/blob - send_command.py
Cosmetic changes to service's imports.
[software/pymin.git] / send_command.py
1 #!/usr/bin/env python
2
3 import sys
4 import socket
5
6 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
7
8 host = sys.argv[1]
9 port = int(sys.argv[2])
10
11 s.bind(('', port+1))
12
13 s.sendto(sys.stdin.read(), 0, (host, port))
14
15 print
16
17 print s.recvfrom(4096)[0]
18