"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The first if is checking for lack of interactive input -- and, as > coded, will never break out as ANY response to the > prompt will have a > newline attached. > > Try with raw_input("> ").strip() instead
Well, I know the first if block works properly. Pressing just ENTER will exit the loop and close the client socket. > The second if is checking for empty receive block... And since > .recv() blocks until it has something to return (as I recall) it may not > be of use... Interesting point. I'm not sure if it works that way though. I *think* I tried sending an empty string from the server back to the client, and as expected it exited the loop and closed the client, which doesn't make sense to me, since an empty string could be perfectly valid return data. I opted to remove the second if statement and see where that takes me. :) -- http://mail.python.org/mailman/listinfo/python-list