469,270 Members | 1,026 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Python for Embedded Devices?

Java seems to have taken off as the platform and language of choice
for many embedded devices. Would it be feasible for Python(perhaps
running on an embedded version of Linux) to act in such a capacity.
Most of my experience with Python has been with Unix-type scripting
tasks and using it when it is an applications built in scripting, but
I know some people try to use to build larger complex applications. Is
the Python interpreter portable and good enough to be used in resource
constrained devices like cell phones?
Jul 18 '05 #1
12 2855
EP:
I previously read some comparisons which did not show Python in a good light
in this regard: i.e. Python is slow compared to Perl, C++, Java.


These are usually pure compute benchmarks at the interpreted language
level. In practice I find that my Python programs perform somewhat better
than Java, probably because Python has many libraries implemented in C,
whereas Java has many pure Java libraries.

--
René Pijlman
Jul 18 '05 #2
There have been a few projects to bring Python to "small" platforms like
handheld computers such as wince and palm. These are typically full
implementations of Python with a few omissions from the core language
(eg unicode, complex numbers) and a stripped-down set of standard
modules. I think this typically requires a meg or two for installation,
and I don't know whether these projects are actively maintained.

Jeff

Jul 18 '05 #3
In article <ef**************************@posting.google.com >,
Brandon <br*********@yahoo.com> wrote:
Java seems to have taken off as the platform and language of choice
for many embedded devices. Would it be feasible for Python(perhaps
running on an embedded version of Linux) to act in such a capacity.
Most of my experience with Python has been with Unix-type scripting
tasks and using it when it is an applications built in scripting, but
I know some people try to use to build larger complex applications. Is
the Python interpreter portable and good enough to be used in resource
constrained devices like cell phones?


Yes.

And no. Yes, Python is certainly feasible for current
cellular telephones. I don't see it poised for explo-
sive growth there, but neither for technical defects
nor because of any lack of good wishes on my part.
'Twould thrill me to write more Python on embedded
projects.

The one point I'd emphasize when thinking about this
is that "embedded devices" covers a wide range, as I
believe you already know. Some developers commonly
work with hardware that's far, far more constrained
than are cellular telephones; others, who also program
embedded devices, can't be distinguished from vanilla
Linux coders.
--

Cameron Laird <cl****@phaseit.net>
Business: http://www.Phaseit.net
Jul 18 '05 #4
br*********@yahoo.com (Brandon) wrote in message news:<ef**************************@posting.google. com>...
Java seems to have taken off as the platform and language of choice
for many embedded devices. Would it be feasible for Python(perhaps
running on an embedded version of Linux) to act in such a capacity.
Most of my experience with Python has been with Unix-type scripting
tasks and using it when it is an applications built in scripting, but
I know some people try to use to build larger complex applications. Is
the Python interpreter portable and good enough to be used in resource
constrained devices like cell phones?


Why only embeded devices?
It should possible to create complete J2EE like platform for python
for creating complex applications. [ i m no expert. lokking for a
simple discussion.]
Jul 18 '05 #5
In article <42**************************@posting.google.com >,
mir nazim <mi****@yahoo.com> wrote:
Jul 18 '05 #6
cl****@lairds.com (Cameron Laird) wrote in message news:<vv***********@corp.supernews.com>...
The one point I'd emphasize when thinking about this
is that "embedded devices" covers a wide range, as I
believe you already know. Some developers commonly
work with hardware that's far, far more constrained
than are cellular telephones; others, who also program
embedded devices, can't be distinguished from vanilla
Linux coders.


I am one such developer who works with very small systems: 8-bit
micros with under 128K flash and 4K RAM. I am keenly interested in
Python or some other similar langauge that would run on such hardware.
'C' is the usual language for such environments, but I believe that,
in many cases, using a dynamic and 'object-able' language would reduce
development time and improve product quality significantly.

I've looked at Io, Lua, PyMite and Pippy, to name a few, and none are
quite appropriate. Io is perhaps the closest match, if it were
stripped down a lot.

I have been tinkering around with some ideas to make a new language to
fit the environment I deal with. This is slow work, as I haven't a lot
of time to spend on it, and I am not a language design expert, but I'm
having fun with it!
Jul 18 '05 #7
On Sun, Jan 04, 2004 at 03:37:46PM -0800, Phil Schmidt wrote:
I am one such developer who works with very small systems: 8-bit
micros with under 128K flash and 4K RAM. [...]


Luxury! My current interest runs to microcontrollers with 2k flash, 128
bytes sram, and 128 bytes eeprom. Yours sounds a lot like one of the
larger models in the same line, though. (Atmel AVR)

It's actually quite fun, and since 128 bytes is too little to use
recursion or dynamic allocation for anything, stuff like reference
counting and GC are unneeded---not a lot of strings, either. C is a
not a bad language for this hardware.

Jeff

Jul 18 '05 #8
Hello Phil,
I've looked at Io, Lua, PyMite and Pippy, to name a few, and none are
quite appropriate. Io is perhaps the closest match, if it were
stripped down a lot. Have you looked at tinyscheme? It a full scheme interpreter in one C file.
http://tinyscheme.sourceforge.net/home.html
I have been tinkering around with some ideas to make a new language to
fit the environment I deal with. This is slow work, as I haven't a lot
of time to spend on it, and I am not a language design expert, but I'm
having fun with it!

Maybe you can work with Fredrik Lundh on Pytte (http://effbot.org/zone/pytte.htm)

HTH.
Miki
Jul 18 '05 #9
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have been tinkering around with some ideas to make a new language to
fit the environment I deal with. This is slow work, as I haven't a lot
of time to spend on it, and I am not a language design expert, but I'm
having fun with it!
Maybe you can work with Fredrik Lundh on Pytte

(http://effbot.org/zone/pytte.htm)

Thanks for this link. There's nothing to download there, unfortunately. :^(

Something else that's interesting for embedded devices is an environment for
working in Python and generating the RTOS:

"WhatOS is a free open source embedded system development solution. It
provides a complete set of tools for creating high-quality, reliable embedded
systems. These include: a real-time operating system (RTOS) generator, a
simulator for testing and debugging generated systems, and tools for
interacting with systems remotely after they have been embedded."

http://www.sticlete.com/whatos/index.html
- --
Nicola Larosa - ni*******@m-tekNico.net

"I am afraid that if the United States had to live by the [monetary]
rules that are imposed on, say, Brazil, the USA would become a
developing country in one generation. It's the system that is
currently unstable, unfair and not working." -- Bernard Lietaer

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/+SfUXv0hgDImBm4RAkkxAKCgi/prJnHbYv4BtiJwK/0g/KB3SQCfeyFR
y5tG2razumSaRYG5cyVe7Y4=
=a8cP
-----END PGP SIGNATURE-----
Jul 18 '05 #10
What about cases where the OS shields you from porting issues?

This is a question which interests me at the moment, as I'm
considering some future embedded work.

Python is available as a package for NetBSD. To what extent
does this mean that, if you can install NetBSD, you can run
a Python interpreter?

http://www.netbsd.org celebrates the fact that it targets
SBCs and some handheld devices.

Has anyone out there any experience of Python on NetBSD on embedded platforms?

Here's hoping,

Dave.
Jul 18 '05 #11
In article <33**************************@posting.google.com >,
Dave <go**********@thuswise.com> wrote:
What about cases where the OS shields you from porting issues?

This is a question which interests me at the moment, as I'm
considering some future embedded work.

Python is available as a package for NetBSD. To what extent
does this mean that, if you can install NetBSD, you can run
a Python interpreter?

Jul 18 '05 #12
Phil Schmidt wrote:

I am one such developer who works with very small systems: 8-bit
micros with under 128K flash and 4K RAM. I am keenly interested in
Python or some other similar langauge that would run on such hardware.
'C' is the usual language for such environments, but I believe that,
in many cases, using a dynamic and 'object-able' language would reduce
development time and improve product quality significantly.

I've looked at Io, Lua, PyMite and Pippy, to name a few, and none are
quite appropriate. Io is perhaps the closest match, if it were
stripped down a lot.


Would you be willing to spend a sentence or two describing what basic
problems you feel each of those has for your application?

-Peter
Jul 18 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by John Benson | last post: by
217 posts views Thread by gyromagnetic | last post: by
34 posts views Thread by Ville Voipio | last post: by
30 posts views Thread by Stuart Turner | last post: by
reply views Thread by Nick White [MSFT] | last post: by
4 posts views Thread by Gerardo Herzig | last post: by
3 posts views Thread by Malte Forkel | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.