Skip to content

Commit edc0a66

Browse files
committed
tokenize: Add minimal stub to support linecache.
1 parent 47e7441 commit edc0a66

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

python-stdlib/tokenize/metadata.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
srctype = micropython-lib
2+
type = module
3+
version = 1.0
4+
author = Andrew Leech
5+
long_desc = Minimal tokenize stub supporting open() in utf8 encoding.

python-stdlib/tokenize/tokenize.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from builtins import open as _builtin_open
2+
3+
4+
def open(filename):
5+
"""Open a file in read only text mode using utf8.
6+
"""
7+
return _builtin_open(filename, "r", encoding="utf8")
8+

0 commit comments

Comments
 (0)