Re: Client Server Connection Program

2006-07-04 Thread diffuser78
removing int frrom host = int(sys.argv[1]) fixed the problem. Thanks Fred!!! Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > #/ usr/bin/env python > > # filename: tmc.py (CLIENT) > > > > import socket > > import sys > > > > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > > > > host

Re: Client Server Connection Program

2006-07-04 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > #/ usr/bin/env python > # filename: tmc.py (CLIENT) > > import socket > import sys > > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > > host = int(sys.argv[1]) > port = int(sys.argv[2]) the port number is an integer, but the host name/ip is obviously not an

Client Server Connection Program

2006-07-04 Thread diffuser78
Hi, I have the following code for a cline and server which I got from a small tutorial on the web. #!/ usr/bin/env python # tms.py (SERVER) import socket import sys s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = '' port = int(sys.argv[1]) s.bind((host,port)) s.listen(1) conn, add