473,545 Members | 2,679 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3070
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*********@ya hoo.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*********@yah oo.com (Brandon) wrote in message news:<ef******* *************** ****@posting.go ogle.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.c om> wrote:
Jul 18 '05 #6
cl****@lairds.c om (Cameron Laird) wrote in message news:<vv******* ****@corp.super news.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 microcontroller s 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/+SfUXv0hgDImBm4 RAkkxAKCgi/prJnHbYv4BtiJwK/0g/KB3SQCfeyFR
y5tG2razumSaRYG 5cyVe7Y4=
=a8cP
-----END PGP SIGNATURE-----
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1751
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. Since I've only got 128 MB per CPU and the system is already loaded with SQL and transaction processing monitor software, it's small footprint was...
217
8992
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 Perl as a focus, I thought that some of the general points made might be of interest to the Python community. It would certainly be interesting to...
8
4572
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 from embedded devices). Currently, we are using a heavyweight, proprietary log tool developed by another part of the company. This tool contains all...
34
6371
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, probably a few hundred lines of code in Python. There is a need to interact with network using the socket module, and then probably a need to do...
30
2754
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 if anyone from the group could give me some advice on how to respond / if they had been in a similar position. Any help appreciated, Thanks in...
12
2955
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 dependent. You have to create macros , use casting and use indirect addressing (pointers) to read or write to memory mapped I/O. 2) C does not...
0
2192
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 Group. For the full list of upcoming Windows Mobile and Embedded chats, to review archived chat sessions, or to request a reminder for a chat,...
4
2169
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 send sms to some cell via some python library? Waiting for advice. Thanks! Gerardo
3
1829
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 be supported. The router is based on the ADM5120P, has 2MB of flash and 16MB of RAM, so the version of Python 2.5.1 that is part of OpenWrt is...
0
7496
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7685
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7941
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7452
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6014
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3485
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1916
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1039
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.