]> git.llucax.com Git - software/pymin.git/commitdiff
Merge commit 'nico-baryon/master'
authorLeandro Lucarella <llucax@gmail.com>
Wed, 14 Nov 2007 15:26:39 +0000 (12:26 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Wed, 14 Nov 2007 15:26:39 +0000 (12:26 -0300)
send_command.py [new file with mode: 0755]

diff --git a/send_command.py b/send_command.py
new file mode 100755 (executable)
index 0000000..1533a83
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+import sys
+import socket
+
+s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+
+host = sys.argv[1]
+port = int(sys.argv[2])
+
+s.bind(('', port+1))
+
+s.sendto(sys.stdin.read(), 0, (host, port))
+
+print
+
+print s.recvfrom(4096)[0]
+