Python socket.accept nonblocking?
Is there a way I can use python's socket.accept() in a non-blocking way that simply runs it and lets me just check if it got any new connections? I really don't want to use threading. Thanks. Nathan Ostgard You probably want something like select.select() (see documentation ). You supply select() with three lists of sockets: sockets you want to monitor for readability, writability, and error states. The server socket will be readable when a new client is waiting. The select() function will block until one of the socket states has changed. You can specify an optional fourth parameter, timeout ,