2017-05-03 01:47:14 +03:00
|
|
|
import uio
|
|
|
|
import sys
|
|
|
|
|
|
|
|
try:
|
|
|
|
uio.resource_stream
|
|
|
|
except AttributeError:
|
|
|
|
print('SKIP')
|
2017-06-10 20:14:16 +03:00
|
|
|
raise SystemExit
|
2017-05-03 01:47:14 +03:00
|
|
|
|
2017-05-06 18:42:35 +03:00
|
|
|
buf = uio.resource_stream("data", "file2")
|
|
|
|
print(buf.read())
|
2017-05-03 01:47:14 +03:00
|
|
|
|
|
|
|
# resource_stream(None, ...) look ups from current dir, hence sys.path[0] hack
|
|
|
|
buf = uio.resource_stream(None, sys.path[0] + "/data/file2")
|
|
|
|
print(buf.read())
|