Re: Python for embedded systems?

2011-02-24 Thread Joachim Strömbergson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Aloha!

On 2011:02:24 08:04 , Rafe Kettler wrote:
 It's not a matter of language maturity, Python is very mature, it's a
 matter of design. Python is a high-level, garbage-collected,
 interpreted language, and that's not the ideal type of language for
 embedded systems.

Ideal, no. But usable and good to get a solution quckly, yes.

I've developed and deployed a camera control system based on PC/104
running GNU/Linux and the application written in Python. The PC/104 fit
the bill (money, size and power consumption) and the application
performance in Python was more than required. Writing it in Python using
modern tools talking to std devices in Linux made the development a
snap. And the code is portable and easy to change.

For really small embedded systems (8/16-bit MCUs) and hard
RT-constraints Python is not a very good approach for the final system.

But if you can fit a (possibly stripped down) standard OS such as Linux
including Python, you get a very nice environment for a lot of embedded
applications. Embedded is all about cost and hard constraints. But today
you get quite a lot of compute resources for little money and in small
form factors.

Running applications on the bare metal, applications written in C is not
always the optimal way to meet cost, technical and market requirements.

Also, Python is a very nice language to model and explore the
application and the design to be implemented. I use Python to build
models of IP cores to be integrated into ASICs and FPGAs. Not using
MyHDL for the actual core generation (yet) though.

- -- 
Med vänlig hälsning, Yours

Joachim Strömbergson - Alltid i harmonisk svängning.

Kryptoblog - IT-säkerhet på svenska
http://www.strombergson.com/kryptoblog

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1mD4QACgkQZoPr8HT30QFgGwCg6fl4sTlUTF6ICSdC0nGy25hY
NBgAnRjY+sZTFO3mjVsS0lsIjCz57qoK
=FPHr
-END PGP SIGNATURE-
-- 
http://mail.python.org/mailman/listinfo/python-list


Python for embedded systems?

2011-02-23 Thread Paulito
Apologies if this has been asked; I haven't yet Googled the archives.

From a brief email conversation, Guido pointed me to this newsgroup to
ask the following questions:

Is Python 'mature' enough to be considered the primary language for
embedded systems? Is the performance there for real-time applications
(eg avionics, real-time control systems) or is it still more suitable
...as a glue language,  used to combine components written in C++ ?

And further:
Has anyone tried to shorten development time when porting code to a
new embedded hardware platform, by trying to convert legacy code (C/C+
+/Ada) to Python?

I'm currently thinking that Python isn't there yet but certainly would
like to hear any feedback.

Your input is greatly appreciated; thanks!
- Paulito
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for embedded systems?

2011-02-23 Thread Paul Rubin
Paulito paul...@gmail.com writes:
 Is Python 'mature' enough to be considered the primary language for
 embedded systems? Is the performance there for real-time applications
 (eg avionics, real-time control systems) or is it still more suitable
 ...as a glue language,  used to combine components written in C++ ?

IMO it's not a matter of maturity, but of design features.  If you mean
hard real time, Python really is not suited to that type of application,
which has rather specialized requirements.  Python is surely used in
some soft realtime applications since lots of embedded devices these
days are fairly standard linux boxes under the skin.

 And further:
 Has anyone tried to shorten development time when porting code to a
 new embedded hardware platform, by trying to convert legacy code (C/C+
 +/Ada) to Python?

That would be a re-implementation rather than a port.  Closest thing I
can think of is Ericsson switching from C++ to Erlang in its phone
switches.

 I'm currently thinking that Python isn't there yet but certainly would
 like to hear any feedback.

Do you have a specific application in mind?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for embedded systems?

2011-02-23 Thread Rafe Kettler
On Feb 23, 6:53 pm, Paulito paul...@gmail.com wrote:
 Apologies if this has been asked; I haven't yet Googled the archives.

 From a brief email conversation, Guido pointed me to this newsgroup to
 ask the following questions:

 Is Python 'mature' enough to be considered the primary language for
 embedded systems? Is the performance there for real-time applications
 (eg avionics, real-time control systems) or is it still more suitable
 ...as a glue language,  used to combine components written in C++ ?

 And further:
 Has anyone tried to shorten development time when porting code to a
 new embedded hardware platform, by trying to convert legacy code (C/C+
 +/Ada) to Python?

 I'm currently thinking that Python isn't there yet but certainly would
 like to hear any feedback.

 Your input is greatly appreciated; thanks!
 - Paulito

Python is probably not the best choice for embedded systems because it
lacks fine control over hardware, something that C and C++ have in
bunches. Also, it doesn't perform well enough to be considered for
situations where resources are at a premium (think microcontrollers).

Could you develop in Python for a platform like Android or iPhone?
Yeah, they have the space, memory, and CPU to run Python stuff. But on
weaker CPUs and less memory, Python would be a poor choice.

It's not a matter of language maturity, Python is very mature, it's a
matter of design. Python is a high-level, garbage-collected,
interpreted language, and that's not the ideal type of language for
embedded systems.

Rafe
-- 
http://mail.python.org/mailman/listinfo/python-list


Python for embedded systems development

2010-09-03 Thread VGNU Linux
Hi,
Is there anyone using python for embedded systems development ?
I have no idea where to start with. Google was of little help.
Will appreciate if someone could guide me on from where to start.

Regards
Vgnu
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for embedded systems with memory constraints

2007-06-11 Thread vishnu

Hello,

Using the best fit for Python will not be a problem, because Python makes
allocations of lot of small size blocks.So those split blocks of small sizes
are used by Python sometime. And what I observed from my investigation with
the memory manager(MM) for Python is , with any MM we cannot eliminate
fragmentation and even though  Python is memory hungry I cannot allot some
50MB (or more) just for python application because it will add to the
embedded system memory cost.
So now I only see the solution to clear my memory pool and restart Python
without restarting the system (i.e. no power cycle to hardware). I tried to
do this when my memory pool is 60% used in these steps:
1) Py_Finalize( )
2) Reset my Memory pool (i.e. free list links)
3) Then Restart Python by calling Py_Initialize().

But this resulted in Python  crash during Py_Initialize(), where I found
that the static variables within embedded Python source code are still
holding some of the references to my memory pool. So now my question is how
do I restart Python (i.e. reinitialize Python) without restarting whole
system. Is there a way to reset/re-initilaize those static variables such
that it will be possible to re-Initialize Python.


Vishnu


On 6/10/07, MRAB [EMAIL PROTECTED] wrote:

On Jun 9, 1:33 pm, vishnu [EMAIL PROTECTED] wrote:
 Hi,
 Thanks Cameron for your suggestions.
 In fact I am using custom memory sub-allocator where I preallocate a
 pool of memory during initialization of my application and ensure that
 Python doesn't make any system mallocs later . With this arrangement,
 python seems to run out of preallocated memory (of 10MB) after running
 few simple scripts due to huge external fragmentation. My memory
 sub-allocator got a good design which uses the best-fit algorithm and
 coaelescing the adjacent blocks during each free call.
 If anybody out there used their own memory manager and ran Python
 without fragmentation , could provide some inputs on this.

From what I remember, the best-fit algorithm isn't a good idea because
unless the free block was exactly the right size you'd tend to get
left with lots of small fragments. (Suppose that the best fit was a
free block only 4 bytes bigger than what you want; what can you do
with a free block of 4 bytes?)

A worst-fit algorithm would leave larger free blocks which are more
useful subsequently, but I think that the recommendation was next-fit
(ie use the first free block that's big enough, starting from where
you found the last one).

--
http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python for embedded systems with memory constraints

2007-06-11 Thread Gabriel Genellina
En Mon, 11 Jun 2007 15:59:19 -0300, vishnu [EMAIL PROTECTED] escribió:

 So now I only see the solution to clear my memory pool and restart Python
 without restarting the system (i.e. no power cycle to hardware). I tried  
 to
 do this when my memory pool is 60% used in these steps:
 1) Py_Finalize( )
 2) Reset my Memory pool (i.e. free list links)
 3) Then Restart Python by calling Py_Initialize().

 But this resulted in Python  crash during Py_Initialize(), where I found
 that the static variables within embedded Python source code are still
 holding some of the references to my memory pool. So now my question is  
 how
 do I restart Python (i.e. reinitialize Python) without restarting whole
 system. Is there a way to reset/re-initilaize those static variables such
 that it will be possible to re-Initialize Python.

Ouch... I think this should not happen, but anyway I don't know if this  
was a design principle. One should inspect all Python code to locate all  
static variable references... Maybe you could instrument your allocator to  
see which references are still held?
C extensions may be problematic too - there is no way to uninitialize  
them, and nothing forbids an extension to hold a reference to any object.

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for embedded systems with memory constraints

2007-06-09 Thread vishnu
Hi,
Thanks Cameron for your suggestions.
In fact I am using custom memory sub-allocator where I preallocate a
pool of memory during initialization of my application and ensure that
Python doesn't make any system mallocs later . With this arrangement,
python seems to run out of preallocated memory (of 10MB) after running
few simple scripts due to huge external fragmentation. My memory
sub-allocator got a good design which uses the best-fit algorithm and
coaelescing the adjacent blocks during each free call.
If anybody out there used their own memory manager and ran Python
without fragmentation , could provide some inputs on this.

Thanks in advance.

On 6/7/07, Cameron Laird [EMAIL PROTECTED] wrote:
 In article [EMAIL PROTECTED],
 vishnu  [EMAIL PROTECTED] wrote:
 Hi there,
 
 I am embedding python 2.5 on embedded system running on RTOS where I
 had strict memory constraints.
 As python is a huge malloc intensive application, I observed huge
 memory fragmentation in my system which is leading to out of memory
 after running few scripts.
 So I decided to re-initialise the python with out restarting the whole 
 python.
 I tried to use Py_Finalise() after completion of each script , then
 call Py_Initialise as is done in below link.
 http://mail.python.org/pipermail/python-list/2001-November/114253.html
 Which in every loop it causes a leak of 10K and after some iterations
 it leaks of 200K etc. After few more runs this crashes. I read some
 where this leak was solved in 2.5, but with 2.5 also I am having
 problems
 And also I found Py_Finalise does not completely cleanup the memory,
 So how do I re-initialise my memory pool?
 
 Does anybody faced this problem earlier and got any solution hack to
 run the python for a embedded system within own managed memory pool of
 say 10MB?
 
 Any help/ideas are greatly appreciated!. Thanks in advance.

 Your report is interesting and important--and surprising!  I thought
 Python memory allocation is cleaner than you seem to be observing.

 I hope one of the core Python maintainers can address this.  I haven't
 worked at this level recently enough to speculate on why it's happen-
 ing, nor will I soon be in a position to volunteer to research it on
 my own (although I'd eagerly contract to do so on a modestly paid
 basis).

 Depending on your schedule and technology, there are lots of technical
 fixes that might apply:
 A.  quick-starting Python variations that encourage you
 to manage memory on a whole-process level;
 B.  use of one of the many Python variants (even PyPy?)
 that might give you a more favorable memory profile;
 C.  switch to Lua or Tcl as more easily embeddable
 alternative languages;
 D.  custom memory allocator;
 ...
 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for embedded systems with memory constraints

2007-06-09 Thread MRAB
On Jun 9, 1:33 pm, vishnu [EMAIL PROTECTED] wrote:
 Hi,
 Thanks Cameron for your suggestions.
 In fact I am using custom memory sub-allocator where I preallocate a
 pool of memory during initialization of my application and ensure that
 Python doesn't make any system mallocs later . With this arrangement,
 python seems to run out of preallocated memory (of 10MB) after running
 few simple scripts due to huge external fragmentation. My memory
 sub-allocator got a good design which uses the best-fit algorithm and
 coaelescing the adjacent blocks during each free call.
 If anybody out there used their own memory manager and ran Python
 without fragmentation , could provide some inputs on this.

From what I remember, the best-fit algorithm isn't a good idea because
unless the free block was exactly the right size you'd tend to get
left with lots of small fragments. (Suppose that the best fit was a
free block only 4 bytes bigger than what you want; what can you do
with a free block of 4 bytes?)

A worst-fit algorithm would leave larger free blocks which are more
useful subsequently, but I think that the recommendation was next-fit
(ie use the first free block that's big enough, starting from where
you found the last one).

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for embedded systems with memory constraints

2007-06-07 Thread Cameron Laird
In article [EMAIL PROTECTED],
vishnu  [EMAIL PROTECTED] wrote:
Hi there,

I am embedding python 2.5 on embedded system running on RTOS where I
had strict memory constraints.
As python is a huge malloc intensive application, I observed huge
memory fragmentation in my system which is leading to out of memory
after running few scripts.
So I decided to re-initialise the python with out restarting the whole python.
I tried to use Py_Finalise() after completion of each script , then
call Py_Initialise as is done in below link.
http://mail.python.org/pipermail/python-list/2001-November/114253.html
Which in every loop it causes a leak of 10K and after some iterations
it leaks of 200K etc. After few more runs this crashes. I read some
where this leak was solved in 2.5, but with 2.5 also I am having
problems
And also I found Py_Finalise does not completely cleanup the memory,
So how do I re-initialise my memory pool?

Does anybody faced this problem earlier and got any solution hack to
run the python for a embedded system within own managed memory pool of
say 10MB?

Any help/ideas are greatly appreciated!. Thanks in advance.

Your report is interesting and important--and surprising!  I thought
Python memory allocation is cleaner than you seem to be observing.

I hope one of the core Python maintainers can address this.  I haven't
worked at this level recently enough to speculate on why it's happen-
ing, nor will I soon be in a position to volunteer to research it on 
my own (although I'd eagerly contract to do so on a modestly paid
basis).  

Depending on your schedule and technology, there are lots of technical
fixes that might apply:
A.  quick-starting Python variations that encourage you
to manage memory on a whole-process level;
B.  use of one of the many Python variants (even PyPy?)
that might give you a more favorable memory profile;
C.  switch to Lua or Tcl as more easily embeddable 
alternative languages;
D.  custom memory allocator;
...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for embedded systems with memory constraints

2007-06-05 Thread Jürgen Urner
Who else is using python (programmers, scientists, finance)?

Me! Graduated in fine arts. Python is what I do when I am fed up with
all those colors. Much easier to manufacture sense with.




-- 
http://mail.python.org/mailman/listinfo/python-list


Python for embedded systems with memory constraints

2007-06-04 Thread vishnu
Hi there,

I am embedding python 2.5 on embedded system running on RTOS where I
had strict memory constraints.
As python is a huge malloc intensive application, I observed huge
memory fragmentation in my system which is leading to out of memory
after running few scripts.
So I decided to re-initialise the python with out restarting the whole python.
I tried to use Py_Finalise() after completion of each script , then
call Py_Initialise as is done in below link.
http://mail.python.org/pipermail/python-list/2001-November/114253.html
Which in every loop it causes a leak of 10K and after some iterations
it leaks of 200K etc. After few more runs this crashes. I read some
where this leak was solved in 2.5, but with 2.5 also I am having
problems
And also I found Py_Finalise does not completely cleanup the memory,
So how do I re-initialise my memory pool?

Does anybody faced this problem earlier and got any solution hack to
run the python for a embedded system within own managed memory pool of
say 10MB?

Any help/ideas are greatly appreciated!. Thanks in advance.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-17 Thread Petr Jakeš
J Is there a Python packaging that is specifically for
J embedded systems? ie, very small and configurable so the
J user gets to select what modules to install?

J For Linux-based embedded systems in particular?

J I'm thinking of running it on the Linksys's Linux-based open
J source router WRT54G. It has 4MB flash and 16MB RAM. I think
J another model has 16MB flash. Any possibilities of running
J Python on these systems?

You can run Python on the NSLU2 (Slug)
http://www.nslu2-linux.org/

sw packages:
http://www.nslu2-linux.org/wiki/Unslung/Packages

the best (IMHO) firmware:
http://www.nslu2-linux.org/wiki/DebianSlug/HomePage


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-16 Thread Martin v. Löwis
Carl J. Van Arsdall wrote:
 This raises a good question.  Is there a need for python to change
 somewhat to work better in an embedded profile?  

When I asked this question last on python-dev, there was exactly one
response, and that was yes, it needs to change.

The natural question then is in what way?. To this, the answer
was surprising: It needs better support for cross-compilation.
Apparently, cross-compiling Python is very painful, and I guess
cross-compiling distutils-based packages even more so.

Contributions in that direction are welcome.

Regards,
Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread H J van Rooyen

Carl J. Van Arsdall [EMAIL PROTECTED] Wrote:
To: python-list@python.org
Sent: Friday, July 14, 2006 7:36 PM
Subject: Re: Python for Embedded Systems?


| Grant Edwards wrote:
|  On 2006-07-14, Jack [EMAIL PROTECTED] wrote:
| 
|  Is there a Python packaging that is specifically for
|  embedded systems? ie, very small and configurable so the
|  user gets to select what modules to install?
| 
|  For Linux-based embedded systems in particular?
| 
|  I'm thinking of running it on the Linksys's Linux-based open
|  source router WRT54G. It has 4MB flash and 16MB RAM. I think
|  another model has 16MB flash. Any possibilities of running
|  Python on these systems?
| 
| 
|  A few years back there was a deeply embedded python project,
|  but it's been dead for quite a while:
| 
|   http://www.tucs.fi/magazin/output.php?ID=2000.N2.LilDeEmPy
| 
http://mail.python.org/pipermail/python-announce-list/1999-August/000157.html
| 
| 
| This raises a good question.  Is there a need for python to change
| somewhat to work better in an embedded profile?  Are there many people
| in the community interested in using python for embedded projects?
|

I for one would be interested in using it - if it can be made small enough - I
do not see it helping me with the nitty gritty of getting a system running on
bare metal, as the low level stuff in a small system is still best done in
assembler - but if there is a display and some sort of keyboard and you can
stick to character based stuff it will ease the application part of the work a
lot - its a natural for doing things like logging and simple transactions - and
if the hardware is strong enough to get IP running - then it will open up the
systems to be web based...

It will also be of use as you could prototype on a PC - emulators and simulators
of small systems are mostly a pain as it takes a lot of effort to describe the
actual hardware before these are useful...

Small in this context is an eight bit processor (like an 80x1 | x = 3, 5 )
with some tricks done in the hardware to expand the native 16 bit address space
to address say half a Meg of battery backed up static ram as data space, with
about 62k of code space available for the interpreter and the custom OS to run
in - (Harvard architecture, not von Neumann) - These processors have lately been
improved from the original about half a MIP to now give sustained performance of
better than 10 MIPS - So they may just be able to cripple along doing the
interpreting - But its *Quite a Challenge* to fit the interpreter in, though...

It is easily possible to expand these processor's address space to 24 bits -
that is 16 Meg - and it may be a better approach to make a 'Virtual Processor'
to run the python stuff - is there a definition for that sort of thing, akin to
Java's Virtual Processor? - It would be a better approach, as the resultant
higher level work would be more portable - to port to another class of
processor, you need merely write the Virtual Machine - in whatever Language
takes your fancy...

What is the minimum set of instructions and structure needed to make a
simplistic Python? - does anybody know?

Might just be a pipe dream...

- Hendrik van Rooyen


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread Sébastien Boisgérault
Jack a écrit :

 If Python is not the best candidate for embedded systems because
 of the size, what (scripting) language would you recommend?

 PHP may fit but I don't quite like the language. Anything else?
 Loa is small but it does not seem to be powerful enough.

You mean Lua ? Not powerful enough ? What do you mean by
that ? Lua is great IMHO. Sure it does not come with thousands
of libraries, but the language design is extremely clean, the
language constructs powerful and the footprint very small.

16kloc of C code can't hurt your embedded device can they ? ;)

Please tell us what kind of limitation you find in Lua ...

Cheers,

SB

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread Paul Rubin
H J van Rooyen [EMAIL PROTECTED] writes:
 What is the minimum set of instructions and structure needed to make a
 simplistic Python? - does anybody know?

There have been lots of Lisps for the PDP-11 and comparable machines.
Python's runtime semantics are close enough to Lisp that you could
probably get something Python-like running in that kind of machine,
maybe not exactly Python.  You would probably want to use small-Lisp
implementation techniques like BIBOP (big bag of pages, Google for
it) memory organization.  But I don't think any of those Lisps were
really all that useful.  They were written mostly as toys.

SIOD was a well known very small Scheme interpreter that you might
like to play with:

http://en.wikipedia.org/wiki/SIOD
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread Paul Rubin
Paul Rubin http://[EMAIL PROTECTED] writes:
 SIOD was a well known very small Scheme interpreter that you might
 like to play with:
 
 http://en.wikipedia.org/wiki/SIOD

Here's another one that I like.  I haven't actually used it but
studied it for possible integration in an embedded project that I
worked on but that got cancelled.  It seems very good for this type of
thing.  The runtime system is just 20k bytes or so:

   http://hedgehog.oliotalo.fi/

Picolisp is also pretty neat but maybe not aimed the same way:

   http://software-lab.de/down.html

Take the challenge: it is very impressive.  Of course they tailored it
to Pico Lisp's capabilities, but you can see the challenge problem is
very sensible, and the Pico Lisp solution is much easier to get to
than a Python solution:

  http://software-lab.de/succ.html
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread Paul McGuire
Jack wrote:
 Is there a Python packaging that is specifically for
 embedded systems? ie, very small and configurable so the
 user gets to select what modules to install?

You might also look at the gumstix embedded system, Linux running on an
ARM processor in an extremely small form factor.
(http://www.gumstix.net/)

And here is a page with a link to a gumstix Python binary:
http://cs.gmu.edu/~eclab/projects/robots/flockbots/pmwiki.php?n=Main.Python

I'm trying this out as soon as I get home!

-- Paul

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread Paul McGuire
Jack wrote:
 Is there a Python packaging that is specifically for
 embedded systems? ie, very small and configurable so the
 user gets to select what modules to install?

 For Linux-based embedded systems in particular?

 I'm thinking of running it on the Linksys's Linux-based open
 source router WRT54G. It has 4MB flash and 16MB RAM. I think
 another model has 16MB flash. Any possibilities of running
 Python on these systems?

Here's another recently announced hobbyist microcontroller system:
http://makezine.com/controller/

Uses Atmel SAM7X processor, ARM7, 32-bit, 256K Flash, 64K SRAM, up to
55MHz.

On-board Ethernet and CAN (Controller Area Network - wireless)

Various I/O blocks and on-board sensors

~US$150

Start shipping Aug 1st.

No Python binary yet, but cross-platform tools are available.  The guys
at this magazine could really get a jump with a Python build.  Here's a
related site for this kit: www.uCHobby.com 

-- Paul

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread Paul McGuire

 On-board Ethernet and CAN (Controller Area Network - wireless)

Ooops, my bad - CAN is not wireless, it is a serial network
specifically for linking with other ucontroller boards.

I was thinking of the onboard Bluetooth of the gumstix boards.

-- Paul

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread Jack
Yes, I mean Lua, not Loa  :-p

Lua is a nice language. Like you said, it doesn't have many libraries
as Python does. Plus, it's still evolving and the libraries are changing.
I found a few functions not working last time I tried kepler libraries.
It's good for embedded systems though because of its small footprint.
Extensions implemented in C makes it possible that the installation size
doesn't blow up when new stuff is added, like in Python.

But I still like Python better for its power and for the style of the 
language
itself. And I was hoping to find a Python implementation that bears the
principles of Lua to make it suitable for embedded systems :)

 PHP may fit but I don't quite like the language. Anything else?
 Loa is small but it does not seem to be powerful enough.

You mean Lua ? Not powerful enough ? What do you mean by
that ? Lua is great IMHO. Sure it does not come with thousands
of libraries, but the language design is extremely clean, the
language constructs powerful and the footprint very small.

16kloc of C code can't hurt your embedded device can they ? ;)

Please tell us what kind of limitation you find in Lua ...

Cheers,

SB


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread Cameron Laird
In article [EMAIL PROTECTED],
Jack [EMAIL PROTECTED] wrote:
Yes, I mean Lua, not Loa  :-p

Lua is a nice language. Like you said, it doesn't have many libraries
as Python does. Plus, it's still evolving and the libraries are changing.
I found a few functions not working last time I tried kepler libraries.
It's good for embedded systems though because of its small footprint.
Extensions implemented in C makes it possible that the installation size
doesn't blow up when new stuff is added, like in Python.

But I still like Python better for its power and for the style of the 
language
itself. And I was hoping to find a Python implementation that bears the
principles of Lua to make it suitable for embedded systems :)

 PHP may fit but I don't quite like the language. Anything else?
 Loa is small but it does not seem to be powerful enough.

You mean Lua ? Not powerful enough ? What do you mean by
that ? Lua is great IMHO. Sure it does not come with thousands
of libraries, but the language design is extremely clean, the
language constructs powerful and the footprint very small.

16kloc of C code can't hurt your embedded device can they ? ;)

Please tell us what kind of limitation you find in Lua ...
.
.
.
PHP is about as bad a choice as there is for this domain.
Let's talk about it some other time.

The usual contestants are Forth, Lua, Tcl, and various Lisps.  
Python could play quite well at least in some situations, but
entirely no one has done much since 1.5.2 times (which doesn't
seem to me like a long time).

If you're to the point of sniffing at Lua's relative poverty
of libraries, you need to detail your requirements more pre-
cisely.  What's small and embedded to some people is a 
full-featured host to others.  Generally speaking, yes, Lua
is still advancing significantly, or, from a different per-
spective, it hasn't stabilized yet.  The point is that there's
necessarily no Pareto optimizer which is simultaneously
smallest, fastest, newest, most mature, most Unicode-aware,
most featureful, lowest-level, highest-level, ...  That's why
there's a point to the engineering we do here.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread Cameron Laird
In article [EMAIL PROTECTED],
Carl J. Van Arsdall [EMAIL PROTECTED] wrote:
.
.
.
This raises a good question.  Is there a need for python to change 
somewhat to work better in an embedded profile?  Are there many people 
in the community interested in using python for embedded projects?
.
.
.
Yes and no.  Python could thrive for the next decade while
utterly surrendering the small-and-embedded domain to Forth,
Lua, Tcl, Scheme, and so on, so, no, there's no *need* for a
TinyPython.  On the other hand, yes, there are at least several
of us with an interest and occasional opportunities for Python
in such applications.  While URL:
http://www.engcorp.com/acf/RecentChanges  looks dormant, it
was set up to serve just such constituencies, and we might yet
breathe life into it--just as any of the other several TinyPython
initiatives might, or might not, revivify.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread Paul Rubin
[EMAIL PROTECTED] (Cameron Laird) writes:
 Yes and no.  Python could thrive for the next decade while
 utterly surrendering the small-and-embedded domain to Forth,
 Lua, Tcl, Scheme, and so on, so, no, there's no *need* for a
 TinyPython.  On the other hand, yes, there are at least several
 of us with an interest and occasional opportunities for Python
 in such applications. 

I think we should see what happens with PyPy, which might be easier to
target at embedded platforms than CPython is.  Main thing needed would
be a static compiler--I haven't followed PyPy enough to know if it
relies on having Psyco at runtime.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-15 Thread Cameron Laird
In article [EMAIL PROTECTED],
Paul Rubin  http://[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] (Cameron Laird) writes:
 Yes and no.  Python could thrive for the next decade while
 utterly surrendering the small-and-embedded domain to Forth,
 Lua, Tcl, Scheme, and so on, so, no, there's no *need* for a
 TinyPython.  On the other hand, yes, there are at least several
 of us with an interest and occasional opportunities for Python
 in such applications. 

I think we should see what happens with PyPy, which might be easier to
target at embedded platforms than CPython is.  Main thing needed would
be a static compiler--I haven't followed PyPy enough to know if it
relies on having Psyco at runtime.

PyPy indeed presents exciting prospects.
-- 
http://mail.python.org/mailman/listinfo/python-list


Python for Embedded Systems?

2006-07-14 Thread Jack
Is there a Python packaging that is specifically for
embedded systems? ie, very small and configurable so the
user gets to select what modules to install?

For Linux-based embedded systems in particular?

I'm thinking of running it on the Linksys's Linux-based open
source router WRT54G. It has 4MB flash and 16MB RAM. I think
another model has 16MB flash. Any possibilities of running
Python on these systems?

If Python is not the best candidate for embedded systems because
of the size, what (scripting) language would you recommend?

PHP may fit but I don't quite like the language. Anything else?
Loa is small but it does not seem to be powerful enough. 


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-14 Thread Grant Edwards
On 2006-07-14, Jack [EMAIL PROTECTED] wrote:
 Is there a Python packaging that is specifically for
 embedded systems? ie, very small and configurable so the
 user gets to select what modules to install?

 For Linux-based embedded systems in particular?

 I'm thinking of running it on the Linksys's Linux-based open
 source router WRT54G. It has 4MB flash and 16MB RAM. I think
 another model has 16MB flash. Any possibilities of running
 Python on these systems?

A few years back there was a deeply embedded python project,
but it's been dead for quite a while:

 http://www.tucs.fi/magazin/output.php?ID=2000.N2.LilDeEmPy
 http://mail.python.org/pipermail/python-announce-list/1999-August/000157.html

-- 
Grant Edwards   grante Yow!  My BIOLOGICAL ALARM
  at   CLOCK just went off... It
   visi.comhas noiseless DOZE FUNCTION
   and full kitchen!!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-14 Thread Carl J. Van Arsdall
Grant Edwards wrote:
 On 2006-07-14, Jack [EMAIL PROTECTED] wrote:
   
 Is there a Python packaging that is specifically for
 embedded systems? ie, very small and configurable so the
 user gets to select what modules to install?

 For Linux-based embedded systems in particular?

 I'm thinking of running it on the Linksys's Linux-based open
 source router WRT54G. It has 4MB flash and 16MB RAM. I think
 another model has 16MB flash. Any possibilities of running
 Python on these systems?
 

 A few years back there was a deeply embedded python project,
 but it's been dead for quite a while:

  http://www.tucs.fi/magazin/output.php?ID=2000.N2.LilDeEmPy
  http://mail.python.org/pipermail/python-announce-list/1999-August/000157.html

   
This raises a good question.  Is there a need for python to change 
somewhat to work better in an embedded profile?  Are there many people 
in the community interested in using python for embedded projects?



-- 

Carl J. Van Arsdall
[EMAIL PROTECTED]
Build and Release
MontaVista Software

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-14 Thread James Thiele
Jack wrote:
 ...snip...
 If Python is not the best candidate for embedded systems because
 of the size, what (scripting) language would you recommend?


TCL is fairly popular in the embedded space. Fairly small footprint.
The syntax is not to everyone's taste.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-14 Thread gregarican
Here's an URL to a project that appears to be dated from 2004 --
http://skreak.com/wrt54g/python.php.

Jack wrote:
 Is there a Python packaging that is specifically for
 embedded systems? ie, very small and configurable so the
 user gets to select what modules to install?

 For Linux-based embedded systems in particular?

 I'm thinking of running it on the Linksys's Linux-based open
 source router WRT54G. It has 4MB flash and 16MB RAM. I think
 another model has 16MB flash. Any possibilities of running
 Python on these systems?

 If Python is not the best candidate for embedded systems because
 of the size, what (scripting) language would you recommend?

 PHP may fit but I don't quite like the language. Anything else?
 Loa is small but it does not seem to be powerful enough.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-14 Thread Grzegorz Makarewicz
Jack wrote:
 Is there a Python packaging that is specifically for
 embedded systems? ie, very small and configurable so the
 user gets to select what modules to install?

 For Linux-based embedded systems in particular?

 I'm thinking of running it on the Linksys's Linux-based open
 source router WRT54G. It has 4MB flash and 16MB RAM. I think
 another model has 16MB flash. Any possibilities of running
 Python on these systems?

 If Python is not the best candidate for embedded systems because
 of the size, what (scripting) language would you recommend?

 PHP may fit but I don't quite like the language. Anything else?
 Loa is small but it does not seem to be powerful enough. 


   
python on palmos - latest version was below 1.5.2 - but is quite interesting
has small fotoprint, is fast and usefull
but isn't maintained by years

mak

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for Embedded Systems?

2006-07-14 Thread gregarican
Or Python on the Zaurus, which I used to develop a wifi CRM app on a
group of refurb Sharp Zaurus SL-5500 units. Here's a link to the Python
implementation on the Z -- http://starship.python.net/~hinsen/Zaurus/.

Grzegorz Makarewicz wrote:
 Jack wrote:
  Is there a Python packaging that is specifically for
  embedded systems? ie, very small and configurable so the
  user gets to select what modules to install?
 
  For Linux-based embedded systems in particular?
 
  I'm thinking of running it on the Linksys's Linux-based open
  source router WRT54G. It has 4MB flash and 16MB RAM. I think
  another model has 16MB flash. Any possibilities of running
  Python on these systems?
 
  If Python is not the best candidate for embedded systems because
  of the size, what (scripting) language would you recommend?
 
  PHP may fit but I don't quite like the language. Anything else?
  Loa is small but it does not seem to be powerful enough.
 
 
 
 python on palmos - latest version was below 1.5.2 - but is quite interesting
 has small fotoprint, is fast and usefull
 but isn't maintained by years
 
 mak

-- 
http://mail.python.org/mailman/listinfo/python-list