adds python implementations
- more README - fix some C++ code along the way
This commit is contained in:
parent
77db20f931
commit
016852e281
7 changed files with 199 additions and 43 deletions
21
service1.py
Executable file
21
service1.py
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Start server")
|
||||
|
||||
while True:
|
||||
with open(sys.argv[1]) as fin:
|
||||
datas = fin.readline()
|
||||
|
||||
data = datas.strip()
|
||||
print("Received: <",data,">", file=sys.stderr)
|
||||
|
||||
with open(sys.argv[2], 'w') as fout:
|
||||
fout.write(data)
|
||||
|
||||
if data == "exit":
|
||||
break
|
||||
|
||||
print("Stop server", file=sys.stderr)
|
||||
Loading…
Add table
Add a link
Reference in a new issue