Hi,
I have a question about using an external python project/module in micropython.
Specifically I tried as an experiment to load the mpmath project which is implemented in python.
It seems that it relies on modules such as operator.py distutils etc.
In the root directory (of mplab distro) is a file call setup.py which relies on distutils.setup which doesn't exist in micropython from what I can see.
So in this example operator.py and distutils.py are missing.
If these modules exist in the main python branch and are written in python, can I also expect them to work in micropython?
I am running on as STM32F746Discovery board for now and my scripts are on sdcard. So flash storage is not a problem. RAM is around 300KB.
So I guess my question is , assuming I can find the missing modules, would it be possible to use them?
Thanks Graeme
Importing a module
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Importing a module
A definitive, general, answer is impossible. Much code written for Python3 will run, but there are differences between MicroPython and CPython https://github.com/micropython/micropyt ... ifferences. Accommodating these may involve some work. Also RAM can be an issue for large libraries.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.