On 21Jul2020 0633, Huang, Yang wrote:
Yes. Micropyhton is also in consideration.
But sqlite3 is the first usage. There should be some additional features like numpy, scipy... Not sure if micropython supports well?
Or is there a feasible way to strip CPython ?
Only by manually removing modules from your own build. However, if you do that but want to continue using third-party packages, you'll find that there is very little you can remove (and nothing of significance). The most interesting modules to omit are ssl and ctypes, because of the exposure to likely security issues (via OpenSSL and libffi), but practically every module out there will have some sort of dependency on these. So you'll end up only removing small/niche modules that might save you a couple of kilobytes of Python code. Of the modules you suggested initially, I think you'll find that you need all of them for SQLite, let alone more complex libraries such as numpy. In theory, we could have a smaller set of modules, but in practice there are so many cross-dependencies already out there that there isn't much to gain right now. It would take a bit of an ecosystem "reset" (i.e. develop completely new popular libraries with more narrowly scoped dependencies) to narrow things down at this point, and there's not much chance of that happening. Cheers, Steve