add python client

This commit is contained in:
Hieu Hoang 2017-02-17 15:30:41 +00:00
parent 25793ccb4b
commit b0de23491f

14
scripts/client.py Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env python
from websocket import create_connection
import time
with open("testfile.en") as f:
for line in f:
ws = create_connection("ws://localhost:8080/translate")
ws.send(line)
result=ws.recv()
print(result)
ws.close()
#time.sleep(5)