> On 18 March 2005, Donovan Baarda said: >>Many Python library methods and classes like select.select(), os.popen2(), >>and subprocess.Popen() return and/or operate on builtin file objects. >>However even simple applications of these methods and classes require the >>files to be in non-blocking mode. I don't agree with that. There's no need to use non-blocking I/O when using select(), and in fact things are less confusing if you don't. >>The read method's current behaviour needs to be documented, so its actual >>behaviour can be used to differentiate between an empty non-blocking read, >>and EOF. This means recording that IOError(EAGAIN) is raised for an empty >>non-blocking read. Isn't that unix-specific? The file object is supposed to provide a more or less platform-independent interface, I thought. -- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg.ewing at canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4