micro-python - is it possible?

2005-08-30 Thread Evil Bastard
Hi, Has anyone done any serious work on producing a subset of python's language definition that would suit it to a tiny microcontroller environment? In its full form, python is a resource hog. If a microcontroller implementation honoured the 'everything is an object' philosophy, the code would sp

Re: What is Python?!

2005-08-10 Thread Evil Bastard
bruno modulix wrote: > You can tell buy the most common use. bash is a scripting language, > javascript is a scripting language, perl is a scripting language, php is > a scripting language, Python is *not* a scripting language !-) Perhaps a better definition - the term 'scripting language' is incr

Re: python for microcontrollers

2005-08-09 Thread Evil Bastard
Peter Hansen wrote: > So while it would probably make an > interesting project, and I'm pretty sure it's quite feasible, grabbing > an off the shelf Forth might be a more productive use of your time. Heh, methinks one might be misunderstanding the Forth culture. Forth compilers are like poetry, i

Re: python for microcontrollers

2005-08-09 Thread Evil Bastard
Peter Hansen wrote: > So while it would probably make an > interesting project, and I'm pretty sure it's quite feasible, grabbing > an off the shelf Forth might be a more productive use of your time. Heh, methinks one might be misunderstanding the Forth culture. Forth compilers are like poetry, i

Re: python for microcontrollers

2005-08-09 Thread Evil Bastard
Paul Rubin wrote: > I don't think you want to do this. Runtime type tags and the overhead > of checking them on every operation will kill you all by themselves. > Processors like that haven't been used much as Lisp targets either, > for the same reasons. Pick a different language. On thinking ab

Re: Python Project (sigh with Java)

2005-08-08 Thread Evil Bastard
Ramza Brown wrote: > And I normally don't take the entire python library with me. I just > take 'jython.jar' so I can distribute it easier. Agreed - if one is happy with the costs of java inter-operation, then jython rocks the house. Otherwise, I could recommend PMW atop Tkinter, since the python

Re: python for microcontrollers

2005-08-08 Thread Evil Bastard
Benji York wrote: > Perhaps porting Pyrex would be easier. Pyrex takes a python-like syntax > (plus type information, etc.) and emits C, which is then compiled. Pyrex totally rocks. But for the PIC targetting, no can do: - pyrex generates a **LOT** of code, which makes extensive use of the py

python for microcontrollers

2005-08-08 Thread Evil Bastard
Hi all, I'm currently tackling the problem of implementing a python to assembler compiler for PIC 18Fxxx microcontrollers, and thought I'd open it up publicly for suggestions before I embed too many mistakes in the implementation. The easy part is getting the ast, via compiler.ast. Also easy is g

seek python parser

2005-08-06 Thread Evil Bastard
Hi, Does anyone know of a python source parser program which can return the parsed source file as a coherent dom-like data structure? I'm playing around with ast, and the output of ast.tolist(), but it's got a lot of chaff, and would need a lot of hacking to break it down to simple data structure