Seabright Technology Header Image

Python in deeply embedded systems

I like Python and would like to use Python everywhere. The question is, is Python suitable as a glue language on a embedded Linux system?

With a few hacks Python 1.5.2 cross compiles just fine. The speed will be acceptable so it’s really only the size that matters.

A standard build under x86 is 12.6M. From there:

  • Stripping python saves 1.1M
  • Removing man and include saves 400k
  • Removing *.py and *.pyo saves 2.8M but still lets everything run
  • Removing Tk, Config, and stdwin saves 3.9M
  • Removing test saves 1.9M

This brings a fully working Python interpreter with all of the command line libraries down to 2.4M. Quite respectable.

Leave a Reply