mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 21:20:13 +01:00
py/modio: resource_stream: Implement "package" param handling.
This commit is contained in:
@@ -7,10 +7,8 @@ except AttributeError:
|
||||
print('SKIP')
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
buf = uio.resource_stream("data", "file2")
|
||||
except NotImplementedError:
|
||||
pass
|
||||
buf = uio.resource_stream("data", "file2")
|
||||
print(buf.read())
|
||||
|
||||
# resource_stream(None, ...) look ups from current dir, hence sys.path[0] hack
|
||||
buf = uio.resource_stream(None, sys.path[0] + "/data/file2")
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
1234
|
||||
1234
|
||||
|
||||
Reference in New Issue
Block a user