Python for Embedded Devices?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brandon

    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?
  • Rene Pijlman

    #2
    Re: Speed?

    EP:[color=blue]
    >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.[/color]

    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

    Comment

    • Jeff Epler

      #3
      Re: Python for Embedded Devices?

      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

      Comment

      • Cameron Laird

        #4
        Re: Python for Embedded Devices?

        In article <efa6f675.04010 21920.3bffced0@ posting.google. com>,
        Brandon <brandon6684@ya hoo.com> wrote:[color=blue]
        >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?[/color]

        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 <claird@phaseit .net>
        Business: http://www.Phaseit.net

        Comment

        • mir nazim

          #5
          Re: Python for Embedded Devices?

          brandon6684@yah oo.com (Brandon) wrote in message news:<efa6f675. 0401021920.3bff ced0@posting.go ogle.com>...[color=blue]
          > 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?[/color]

          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.]

          Comment

          • Cameron Laird

            #6
            Re: Python for Embedded Devices?

            In article <425cc8d1.04010 30826.59a9d4ca@ posting.google. com>,
            mir nazim <mir4uu@yahoo.c om> wrote:

            Comment

            • Phil Schmidt

              #7
              Re: Python for Embedded Devices?

              claird@lairds.c om (Cameron Laird) wrote in message news:<vvdl0nbog vm74@corp.super news.com>...
              [color=blue]
              > 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.[/color]

              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!

              Comment

              • Jeff Epler

                #8
                Re: Python for Embedded Devices?

                On Sun, Jan 04, 2004 at 03:37:46PM -0800, Phil Schmidt wrote:[color=blue]
                > I am one such developer who works with very small systems: 8-bit
                > micros with under 128K flash and 4K RAM. [...][/color]

                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

                Comment

                • Miki Tebeka

                  #9
                  Re: Python for Embedded Devices?

                  Hello Phil,
                  [color=blue]
                  > 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.[/color]
                  Have you looked at tinyscheme? It a full scheme interpreter in one C file.

                  [color=blue]
                  > 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![/color]
                  Maybe you can work with Fredrik Lundh on Pytte (http://effbot.org/zone/pytte.htm)

                  HTH.
                  Miki

                  Comment

                  • Nicola Larosa

                    #10
                    Re: Python for Embedded Devices?

                    -----BEGIN PGP SIGNED MESSAGE-----
                    Hash: SHA1
                    [color=blue][color=green]
                    >> 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![/color][/color]
                    [color=blue]
                    > Maybe you can work with Fredrik Lundh on Pytte[/color]
                    (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."




                    - --
                    Nicola Larosa - nico-NoSp@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-----

                    Comment

                    • Dave

                      #11
                      Re: Python for Embedded Devices?

                      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.

                      Comment

                      • Cameron Laird

                        #12
                        Re: Python for Embedded Devices?

                        In article <33b7435c.04010 50722.3b01a3d0@ posting.google. com>,
                        Dave <googlegroups@t huswise.com> wrote:[color=blue]
                        >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?[/color]

                        Comment

                        • Peter Hansen

                          #13
                          Re: Python for Embedded Devices?

                          Phil Schmidt wrote:[color=blue]
                          >
                          > 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.[/color]

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

                          -Peter

                          Comment

                          Working...