I'm wondering if it's possible to workaround the small amount of RAM, by loading, then unloading several modules at runtime.
Then I can write more code than can fit in memory.
For example, if I have some pseudo-code which uses
Code: Select all
import sys
# ....
exec('import modtest', {} ) # Instead of globals, use empty dict, so we don't get a reference to the module
sys.modules['modtest'].some_func()
del sys.modules['modtest'] # Remove reference
Does this seem like a reasonable thing to do?
Is it likely to continue to work in future versions of Micropython?
Mark