Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
python
/
cpython3
/
38c707e7e0322f9139bb51ad73ede1e3b46985ef
/
.
/
Lib
/
test
/
test_asyncio
/
echo3.py
blob: 064496736bf3f474ef6f0d582294180ec9d1dc52 [
file
] [
log
] [
blame
]
import
os
if
__name__
==
'__main__'
:
while
True
:
buf
=
os
.
read
(
0
,
1024
)
if
not
buf
:
break
try
:
os
.
write
(
1
,
b
'OUT:'
+
buf
)
except
OSError
as
ex
:
os
.
write
(
2
,
b
'ERR:'
+
ex
.
__class__
.
__name__
.
encode
(
'ascii'
))