> >> You are using a scripting language.. why not use python directly?
>
> > I just want to execute an small set of commands (PLAYSOUND, PLAYMUSIC,
> > WALKTO, PLAYERSAY, SLEEP and a couple more) ... do you think I can
> > write python code inside my object.exec (list attribute) loaded from a
> > file?
>
> Something like that.
>
> Build a dictionary -that will be used as the script global namespace-
> (...)
>
> Warning: this is unsafe!!!. Malicious users could execute arbitrary code;
> although this may not be an issue if the game runs on the user's own
> system.
>
> The advantage is that you let them use all the power of Python as a
> scripting language.

 That's why I was trying to write my own "small" scripting
language :-).

 It works, but I would like to know how to write it better or safer.
That's why I posted the source code.

 Thanks.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to