473,401 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

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 3056
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John Benson | last post by:
Hi, I've been experimenting with Lua on my Tandem Himalaya K100 system (a decade-old 4-CPU fault-tolerant server from Tandem/Compaq/HP) because it looked like it was simpler to port than Python....
217
by: gyromagnetic | last post by:
The following url points to an article written by Damian Conway entitled "Ten Essential Development Practices": http://www.perl.com/pub/a/2005/07/14/bestpractices.html Althought the article has...
8
by: Joakim Persson | last post by:
Hello all. I am involved in a project where we have a desire to improve our software testing tools, and I'm in charge of looking for solutions regarding the logging of our software (originating...
34
by: Ville Voipio | last post by:
I would need to make some high-reliability software running on Linux in an embedded system. Performance (or lack of it) is not an issue, reliability is. The piece of software is rather simple,...
30
by: Stuart Turner | last post by:
Hi Everyone, I'm working hard trying to get Python 'accepted' in the organisation I work for. I'm making some good in-roads. One chap sent me the text below on his views of Python. I wondered...
12
by: Bill Hanna | last post by:
C is inadequate for embedded systems for the following reasons: 1) Direct addressing of memory mapped I/O is not supported simply and easily. You have to find work-arounds that are compiler...
0
by: Nick White [MSFT] | last post by:
Hello fellow Microsoft Windows Mobile and Embedded enthusiasts: I invite you to peruse the list below of upcoming technical chats and Webcasts offered by the Windows Mobile and Embedded Devices...
4
by: Gerardo Herzig | last post by:
Hi dudes. Im looking for a python implementation for sending sms to a cell phone. I was try using some free pages, but i want to use a python. Do i need a cellphone conected to my machine? Or can i...
3
by: Malte Forkel | last post by:
I would like to use Python on a router, an Edimax BR-6104K, running OpenWrt (http://www.openwrt.org). While I probably won't need most of the fancier stuff in Python, serial I/O and threads should...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.