#NEWLINE# def wait_for_write( socket , timeout = None ) : #NEWLINE# #INDENT# 'Wait up to `timeout` seconds until `socket` is ready for writing.\n        ' #NEWLINE# writable = select . select ( [ ] , [ timeout ] , [ ] , timeout ) [ 1 ] #NEWLINE# return writable ( writable )