File: testd.py

package info (click to toggle)
pysrs 1.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 280 kB
  • sloc: python: 1,288; sh: 72; makefile: 23
file content (16 lines) | stat: -rw-r--r-- 405 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Simple test daemon
#
# Copyright (c) 2004-2010 Business Management Systems. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Python itself.

from socket import *
import sys

sock = socket(AF_UNIX,SOCK_STREAM)
sock.connect('/tmp/srsd')
sock.send(b' '.join(sys.argv[1:])+b'\n')
res = sock.recv(128).strip()
print(res)
sock.close()