Close a socket externally
Bryan Olson
fakeaddress at nowhere.org
Sat Oct 2 04:02:30 EDT 2004
I wrote:
> The following isn't tested [...]
Web-posting screwed up the indentation. It should read:
deadline = time.time() + hard_limit_on_the_time
while stuff_to_do:
timeout = deadline - time.time()
if timeout < 0:
break # time limit expired
(readable, _, _) = select.select([mysock], [], [], timeout)
if ! readable:
break # time limit expired
# at this point mysock has data available (barring weird things)
---
--Bryan
More information about the Python-list
mailing list