diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2017-02-20 13:49:40 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2017-02-20 13:49:40 +0300 |
commit | 6ce7162c7f8c70c64e552bc4c4cf69040e5a92f9 (patch) | |
tree | 27e522a638febde0df7fe4a6e6088012a3c0f349 /scripts | |
parent | 18bcf41895ce1085b407532e5b76127069ef11cf (diff) |
tweak client script
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/client.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/client.py b/scripts/client.py index 2d173509..841bf367 100755 --- a/scripts/client.py +++ b/scripts/client.py @@ -2,8 +2,12 @@ from websocket import create_connection import time +import sys -with open("testfile.en") as f: +filePath = sys.argv[1] +print filePath + +with open(filePath) as f: for line in f: ws = create_connection("ws://localhost:8080/translate") ws.send(line) |