任何人为嵌入式项目使用Python? [英] Anyone using Python for embedded projects?
问题描述
我日常工作中唯一真正的问题是缺乏静态检查与常规编译器可能会导致运行时抛出的问题,例如
我们在python中使用python相当多的具有ARM处理器的嵌入式电脑和16 MB RAM(运行linux )
它的工作效果非常好,很容易使自定义代码快速 - python的强项之一。
对于代码的可靠性,我们尝试拥有100%的测试覆盖率。用python编写测试非常快,它给你一个美好的信心。我们使用扭曲试用版来运行测试并报告覆盖面,但还有许多其他工具可用。
在我的经验中,python +测试比任何其他替代方案都更可靠,写得更快。
嵌入式工作的唯一缺点是有时候python可能很慢,有时它会使用很多内存(相对而言)。这并没有导致我们显示停止问题,如果它成为一个问题,python很容易为速度和内存配置文件。
pychecker 也是非常有用的,也将捕获相当多的常见错误。
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.
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.
这篇关于任何人为嵌入式项目使用Python?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!