embedding/parsing script

Erik Max Francis max at alcyone.com
Mon Dec 9 14:21:29 EST 2002


Gumuz wrote:

> I would like to integrate some kind of scripting capability into my
> python
> app.

There are several templating systems that can do this.  I've created one
called EmPy:

	http://www.alcyone.com/pyos/empy/

> How would one go about doing this. I don't want to give my users the
> full
> power of python, because then they could stop the app or delete
> objects etc.
> I want to give them limited scripting capability with a python-like
> syntax.

In that case you'd probably want to pipe execution through a RExec.rexec
instance.  In Python natively, you have eval and exec for evaluating
expressions and executing statements.  A rexec object has analogous
methods for doing this, but attempts to restrict what can be done.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Divorces are made in Heaven.
\__/ Oscar Wilde
    Rules for Buh / http://www.alcyone.com/max/projects/cards/buh.html
 The official rules to the betting card game, Buh.



More information about the Python-list mailing list