diff options
| author | Guido van Rossum <guido@dropbox.com> | 2013-10-17 20:40:50 (GMT) |
|---|---|---|
| committer | Guido van Rossum <guido@dropbox.com> | 2013-10-17 20:40:50 (GMT) |
| commit | 27b7c7ebf1039e96cac41b6330cf16b5632d9e49 (patch) | |
| tree | 814505b0f9d02a5cabdec733dcde70250b04ee28 /Lib/test/test_asyncio/echo3.py | |
| parent | 5b37f97ea5ac9f6b33b0e0269c69539cbb478142 (diff) | |
| download | cpython-27b7c7ebf1039e96cac41b6330cf16b5632d9e49.zip cpython-27b7c7ebf1039e96cac41b6330cf16b5632d9e49.tar.gz cpython-27b7c7ebf1039e96cac41b6330cf16b5632d9e49.tar.bz2 | |
Initial checkin of asyncio package (== Tulip, == PEP 3156).
Diffstat (limited to 'Lib/test/test_asyncio/echo3.py')
| -rw-r--r-- | Lib/test/test_asyncio/echo3.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/echo3.py b/Lib/test/test_asyncio/echo3.py new file mode 100644 index 0000000..f1f7ea7 --- /dev/null +++ b/Lib/test/test_asyncio/echo3.py @@ -0,0 +1,9 @@ +import os + +if __name__ == '__main__': + while True: + buf = os.read(0, 1024) + try: + os.write(1, b'OUT:'+buf) + except OSError as ex: + os.write(2, b'ERR:' + ex.__class__.__name__.encode('ascii')) |
