Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyone using Python for embedded projects? [closed]

My company is using Python for a relatively simple embedded project. Is anyone else out there using Python on embedded platforms? Overall it's working well for us, quick to develop apps, quick to debug. I like the overall "conciseness" of the language.

The only real problem I have in day to day work is that the lack of static checking vs a regular compiler can cause problems to be thrown at run-time, e.g. a simple accidental cat of a string and an int in a print statement can bring the whole application down.

like image 250
Fred Basset Avatar asked Oct 27 '08 18:10

Fred Basset


1 Answers

We use python in quite a lot of embedded boards with ARM processors and 16 MB of RAM (running linux).

It works really well and is really easy to make custom code quickly - one of the strong points of python.

As for reliability of the code - we try to have 100% test coverage. Writing tests with python is very quick and it gives you a wonderful feeling of confidence. We use twisted trial to run the tests and report on coverage, but there are many other tools available.

In my experience python + tests is more reliable and much quicker to write than any other alternatives.

The only downsides for embedded work is that sometimes python can be slow and sometimes it uses a lot of memory (relatively speaking). This hasn't causes us a show stopping problem yet, and python is quite easy to profile for both speed and memory if it becomes a problem.

pychecker is a very useful too also which will catch quite a lot of common errors.

like image 200
Nick Craig-Wood Avatar answered Oct 19 '22 23:10

Nick Craig-Wood