blob: f1f7ea7c9e21eddb86b75345cd0e109c32557152 (
plain)
1
2
3
4
5
6
7
8
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'))
|