Another scripting language implemented into Python itself?

Rocco Moretti roccomoretti at hotpop.com
Mon Jan 24 20:20:40 EST 2005


Roy Smith wrote:
> In article <mailman.1231.1106610969.22381.python-list at python.org>,
>  Quest Master <zainalam at gmail.com> wrote:
>
>>So, my question is simply this: is there an implementation of another
>>scripting language into Python?
>  
> Python *is* a scripting language.  Why not just let your users write 
> Python modules which you them import and execute via some defined API?

I can think of a couple of reasons off the top of my head:

The OP doesn't mention his application, but there is something to be 
said about domain specific scripting languages. A well designed 
domain-specific scripting language(*) with the appropriate high level 
constructs can make script writing simpler.

There's also an audience factor. Python is easy to learn, but it's still 
  a programming language. A well designed domain-specific scripting 
language(*) can make it very easy to get work done in a particular case 
without having to learn the Python mind frame. (How assignments work, 
mutable/immutable, Python's call passing system, etc.)

Python's also dangerous. Every time you do an "import module", you put 
your system at risk of crashing, having the hard-drive wiped, sending 
incorrect signal codes to peripherals, etc. A well-designed specialty 
language(*) minimizes those risks - don't need disk access? Don't allow 
it in your language.

There's also the valuable learning experience of designing and 
implementing a scripting language.

(*) Note that I keep saying "well-designed". A poorly designed scripting 
language is very bad - you can feel shackled by the restrictions it 
imposes, and find yourself unable to do what you want without laborious 
contortions, if at all. I also say "domain specific" because, at this 
time, there are enough general purpose scripting languages that you are 
likely to find what you need already existing, unless you are 
experimeting with a completely new programing paradigm.

To answer the OP's question:

Yes - sort of. Currently work is underway to implement the Python 
scripting language in Python. Cleverly called "PyPy", the website is 
"http://www.codespeak.net/pypy".



More information about the Python-list mailing list