You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
343 B
20 lines
343 B
7 years ago
|
try:
|
||
|
import uio as io
|
||
|
except:
|
||
|
import io
|
||
|
|
||
|
try:
|
||
|
io.IOBase
|
||
|
except AttributeError:
|
||
|
print('SKIP')
|
||
|
raise SystemExit
|
||
|
|
||
|
|
||
|
class MyIO(io.IOBase):
|
||
|
def write(self, buf):
|
||
|
# CPython and uPy pass in different types for buf (str vs bytearray)
|
||
|
print('write', len(buf))
|
||
|
return len(buf)
|
||
|
|
||
|
print('test', file=MyIO())
|