Normally, I upload my Python files to the device and use them with a simple import my_class statement in my main code.
Now, I’m working with mBlock5 Device Extension (Block Code), and I want to upload my custom package (along with some supporting libraries) to the device and then import them into my block code without showing all the internal code.
The issue is:
I currently have five files — four are library files (not included in the MicroPython firmware), and one is my custom module. Since mBlock5 requires code to be inserted directly into the blocks, I ended up packing everything into a single file, and when I add that into the first block, it turns into 10,000+ lines of messy code:
My question is:
Is there any way to upload these package files separately and use import in the block code without showing the full source code inside the blocks?
Thanks in advance!