<filename>src/amun/python/test2.py
#!/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)


<filename>src/amun/python/test2.py
#!/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)


#!/usr/bin/env python #time.sleep(5)