mirror of
https://github.com/micropython/micropython.git
synced 2025-09-05 17:30:41 +02:00
10 lines
155 B
Python
10 lines
155 B
Python
try:
|
|
import uio as io
|
|
except ImportError:
|
|
import io
|
|
|
|
# test __enter__/__exit__
|
|
with io.StringIO() as b:
|
|
b.write("foo")
|
|
print(b.getvalue())
|