Stripped-down Python (for embedding in an app)?

Chuck Messenger cmessengeratinamedotcom at spamfooler.com
Mon Apr 23 15:51:03 EDT 2001


Just for reference (for any Deja News hunters out there), I found pretty
much exactly what I was looking for, courtesy of Donavon Keithley: Lua.
See http://www.lua.org

    - Chuck


"Chuck Messenger" <cmessengeratinamedotcom at spamfooler.com> wrote in message
news:CMiE6.17858$gl.1908383 at typhoon.nyroc.rr.com...
> I need to embed a scripting language in an app I'm creating (a gaming
app).
> The only inputs to the language will come from my app, and the only output
> will go to my app.  That is, there will be no OS interaction.  My app is
the
> OS.
>
> I want to use an already-developed scripting language.  Besides the
benefit
> of saving on writing my own interpreter, the biggest benefit is that I
want
> users of my app to be able to reference a mature body of documentation
about
> the scripting language itself, apart from the hooks into my system.
>
> So, Python looks like a promising candidate.  The main problem with Python
> is that I need to strip out all the OS hooks.  This is partly a security
> issue, and partly a code size issue.  Mainly the former.  I'm aware of the
> rexec() feature of Python.  However, in order to assure myself of the
> security of the interpreter, I need to be able to make a Python library
> which doesn't reference anything but the most mundane standard C lib calls
> (strlen types of functions).
>
> Has any work been done in this direction?  That is, a Python with
absolutely
> no OS hooks?  Ideally, even memory allocation would come from my app,
rather
> than malloc.  No file access, including stdio, etc.
>
>
>     - Chuck
>
>





More information about the Python-list mailing list