From fce9ae6cb332bd2525d5e9e113f9e779ca214c64 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sat, 15 Feb 2014 17:41:19 +0100 Subject: make python client pull server hostname from sys.argv --- python_client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python_client.py b/python_client.py index 9cfcd74..ed4d5b1 100644 --- a/python_client.py +++ b/python_client.py @@ -537,7 +537,7 @@ class MainWindow(QtWidgets.QMainWindow): global sock try: basesock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) - basesock.connect(('localhost', 5454)) + basesock.connect((hostname, 5454)) #sock = ssl.wrap_socket(basesock) sock = basesock thd = threading.Thread(None, reader) @@ -575,8 +575,9 @@ class MainWindow(QtWidgets.QMainWindow): -if len(sys.argv) > 1: - password = sys.argv[1] +hostname = sys.argv[1] +if len(sys.argv) > 2: + password = sys.argv[2] else: print('No password entered on command line!') -- cgit v1.2.3