This website requires JavaScript.
Odkrywaj
Pomoc
Zarejestruj się
Zaloguj się
mirror
/
micropython
kopia lustrzana
https://github.com/micropython/micropython
Obserwuj
1
Polub
0
Forkuj
You've already forked micropython
0
Kod
Zgłoszenia
Projekty
Wydania
Wiki
Aktywność
bdf958df30
micropython
/
tests
/
unicode
/
file1.py
5 wiersze
95 B
Python
Czysty
Zwykły widok
Historia
Unescape
Escape
Use mode/encoding kwargs in io and unicode tests mode argument is used to assert it works encoding argument is used to make sure CPython uses the correct encoding as it does not automatically use utf-8
2014-10-04 06:54:16 +00:00
f
=
open
(
"
unicode/data/utf-8_1.txt
"
,
encoding
=
"
utf-8
"
)
tests: Add basic test for unicode file i/o.
2014-06-15 20:28:39 +00:00
l
=
f
.
readline
(
)
print
(
l
)
print
(
len
(
l
)
)