Would you consider using MicroPython to create small, standalone executables for desktop platforms?
-
I have been considering making some contributions to MicroPython to enable the generation of small, standalone executables for desktop platforms. It seems MicroPython executables could be as little as 500KB in size, compared to around 5MB for CPython (with PyInstaller).
Unfortunately, in the linked discussion the idea of using MicroPython in this way was received quite negatively. Doubt was expressed that anybody would be willing to "deal with MicroPython's limitations just in order to get a smaller executable [...] ([MicroPython] only supports a subset of the Python language, and does not support C extensions such as NumPy)".
ShowBox
I am now worried that I would be wasting my time - is there any demand for this feature at all?
Mobdro
If you are writing simple, pure-Python code and creating standalone desktop executables using existing tools (e.g. PyInstaller or py2exe), would you consider working within the limitations of MicroPython to get binaries which are an order of magnitude smaller?
Nox
-
@qwab said in Would you consider using MicroPython to create small, standalone executables for desktop platforms?:
I have been considering making some contributions to MicroPython to enable the generation of small, standalone executables for desktop platforms. It seems MicroPython executables could be as little as 500KB in size, compared to around 5MB for CPython (with PyInstaller).
What do you mean 'desktop platforms'?
How do you create a MicroPython 'standalone desktop executables'?
Which PyCom hardware are you intending to use to create such applications and how?
-
Python is slow. You cannot expect a hugh performance on a PC or a microcontroller. But it is fast enough for many, many tasks.
We cannot tell you, if a Pycom decvice may fit your tasks. Therefore you have to provide much more details.
If you need a lot of float calculations, the pycom implementation will not be your device. Floats are immutable objects like. So they will not be fast. But most float calculations can be done with ints as well.
Pycom devices are great, if you need the radio systems they have on board. So they are good for solving a problems where they send short messages over a long distance. For example you collect the temperature over the day and send min, max, avg and mean temperature each day.
They are not that good, if you want to build a vision controlled robot as the main controller. But it can be used to send you the information how many snails your robot has found on your field and can assist the main controller by collecting some sensor data or tell your robot when it runs outside a GPS fence, ...
ARM based MicroPython shall have better float implementations, but I doubt that they are great for NumPy as well. If you need something like NumPy you may need a combination of a single board computer and a microcontroller.
-
@qwab , this ! writing simple, pure-Python code.