[issue1175] .readline() has bug WRT nonblocking files

2007-09-18 Thread Alex Burr
Alex Burr added the comment: I don't need to change my code as I have now worked round the problem, but for an example of why someone might want nonblocking mode: It was not actually in order to do any more work, but because I was managing both input and output to gdb in one thread

[issue1175] .readline() has bug WRT nonblocking files

2007-09-18 Thread Alex Burr
Alex Burr added the comment: The exception would count as a warning if it wasn't EGAIN. One expects to catch EGAIN and try again. The current situation is unfortunate because it *nearly* works. My scenario is: I'm driving GDB/MI via popen2.Popen3 ( gdbCommand, False,1). It works fo

[issue1175] .readline() has bug WRT nonblocking files

2007-09-18 Thread Alex Burr
New submission from Alex Burr: If you have made a file nonblocking using fcntl.fcntl, .readline() will discard the start of a line if you get EGAIN. It should attach the partial line to the exception somehow - or at least warn the user. I observe this on 2.3.5, but the same code exists in