Added support for closing files and streams.
Made the low-level write operation return the number of bytes written, also
declaring the IOError that can be raised.
1fromsysimportstdin 2 3print"Reading 10 bytes..." 4s=stdin.read(10) 5prints 6 7print"Reading to end of file..." 8s=stdin.read() 9prints