mirror of
https://github.com/python/cpython.git
synced 2025-10-20 08:23:47 +00:00
10 lines
238 B
Python
10 lines
238 B
Python
![]() |
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'))
|