Freezing resources that are not Python scripts
I want to flash modules with html files together, but I can't read them.
e.g list
_boot.py
public/index.html
I modified makemanifest.py to pass other files types as path, I cheked existing it in the firmware.elf, and it exist, but I cant read it for send by http
May be exist way for read those files or what sorces can I modify for get this possibility?
Finalizing frozen modules approach
Frozen modules as implemented in #736, #1074 support only modules (not packages), and implemented in quite adhoc way. Maybe, maybe it could be extended in the same adhoc way to support packages. But as soon you think that to support completely frozen apps we also need to support packaging and accessing data files, it's clear it's not a scalable approach. Alternatives:
One extreme:
Implement complete high-level VFS layer, so it worked up to open("@MY_VFS@/dir/file") on python side.
Another extreme:
Implement all CPython import babylon. (e.g https://docs.python.org/3/library/importlib.html). Sheer number of PEPs required to get it right gives a message that maybe it's still not got right. And wading thru it all to find a suitable subset is a chore on its own.
So, compromise I'm thinking about:
Not implement complete VFS layer for all file system access, but implement kind of abstraction solely on builtinimport.c level, but in such a way so it was reusable to implement pkgutil.get_data(), pkg_resources.resource_stream(). (https://pythonhosted.org/setuptools/pkg_resources.html#resourcemanager-api)
Thoughts?