tokenize: Add minimal stub to support linecache.

Andrew Leech 2022-06-20 11:46:50 +10:00
rodzic 796a5b93f5
commit 1fe75b8544
2 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -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.

Wyświetl plik

@ -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")