kopia lustrzana https://github.com/micropython/micropython-lib
tokenize: Add minimal stub to support linecache.
rodzic
1ef24577c8
commit
8eced76f3e
|
@ -0,0 +1,5 @@
|
||||||
|
srctype = micropython-lib
|
||||||
|
type = module
|
||||||
|
version = 1.0
|
||||||
|
author = Andrew Leech
|
||||||
|
long_desc = Minimal tokenize stub supporting open() in utf8 encoding.
|
|
@ -0,0 +1,8 @@
|
||||||
|
from builtins import open as _builtin_open
|
||||||
|
|
||||||
|
|
||||||
|
def open(filename):
|
||||||
|
"""Open a file in read only text mode using utf8.
|
||||||
|
"""
|
||||||
|
return _builtin_open(filename, "r", encoding="utf8")
|
||||||
|
|
Ładowanie…
Reference in New Issue