Jp Calderone <exarkun at divmod.com> writes: > def nonBlockingReadAll(fileObj): > bytes = [] > while True: > b = fileObj.read(1024) > bytes.append(b) > if len(b) < 1024: > break > return ''.join(bytes) Wouldn't this still block if the input just happened to end at a multiple of the read size (1024)? -- David