Considering Python For Embedded Scripting

Christopher Tavares christophertavares at earthlink.net
Sat Nov 11 05:31:59 EST 2000


Python would be a good choice on the ease of use front. If speed is a
serious issue, you might want to look at Lua at:

    http://www.tecgraf.puc-rio.br/lua/

Lua has the advantage of being a lot smaller than Python (last time I
compiled it on Win32, the dll came out at about 66k,) and runs significantly
faster than python from all reports.

Python's advantages are:

1) The python library is an amazing thing, and has LOTS of great stuff for
your users to get into.

2) Python is much better known and better documented. There are Python books
out there. There aren't any lua books.

3) Lua is very much a "mechanism, not policy" kind of language. Python
provides a complete OO system. Lua provides hooks to create one.

Lua's advantages are:

1) Small size, both in implementation and language. Lua is dirt simple in
it's basic form, but still quite powerful. Start playing with tag methods
and it's amazing what you can come up with.

2) The lua embedding API is simpler than Python's, and IMHO better
documented.

They're both worth a look.

-Chris


"Carey Murray" <carey_murray at hotmail.com> wrote in message
news:%v4P5.480455$1h3.12804450 at news20.bellglobal.com...
> I am working on a new version of a real-time graphics application, and
want
> to replace the current in-house scripting system.  The scripting system
> would be imbedded an application written in C, and would, in turn, call
> utilities written in C.  So, Python would be used as a parser of
> byte-compiled scripts. Scripts are triggered by user actions and are run
in
> real time, so performance is an issue.  The scripts trigger various
events,
> special effects, and primitive creation. The scripts are possibly written
by
> non-programmers, so ease of use is also a consideration.  Would this be a
> good job for Python? Thanks in advance for any advice.
>
>
>





More information about the Python-list mailing list