This website requires JavaScript.
Explore
Help
Sign In
djsundog
/
circuitpython
Watch
1
Star
0
Fork
0
You've already forked circuitpython
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
7dbf74c5b9
circuitpython
/
tests
/
unicode
/
file1.py
5 lines
95 B
Python
Raw
Normal View
History
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 02:54:16 -04:00
f
=
open
(
"
unicode/data/utf-8_1.txt
"
,
encoding
=
"
utf-8
"
)
tests: Add basic test for unicode file i/o.
2014-06-15 16:28:39 -04:00
l
=
f
.
readline
(
)
print
(
l
)
print
(
len
(
l
)
)
Reference in New Issue
Copy Permalink