I am writing a simple client and Python server that works fine by passing the server address in my code, however I want the user to be able to enter the server address, and also throw and fail if this is not true. When I have the code below, I get an error message from the terminal "index index out of range".
server = (sys.argv[1])
serverAdd = (server, '65652') # server address and port number
Can someone help me with this please.
When I run my client program in python, I want to be able to enter the address for connection and storage on the server. I run the program directly from the command line by typing programname.py. The server is already working, listening to incoming connections.
source
share