Re: Executing other python code

2008-01-31 Thread Guyon Morée
> One simple solution would be to forbid import statements in the > scripts, to import the scripts as modules and inject whatever > functions you want them to be able to use in the module's namespace. how do you 'forbid' imports? Guyon http://gumuz.nl -- http://mail.python.org/mailman/listinf

Re: Executing other python code

2008-01-31 Thread Matthew_WARREN
Subject Executing other python code

Re: Executing other python code

2008-01-29 Thread Stefan Behnel
Hi, Tim Rau wrote: > I'm working on a game, and I'd like players to be able to define thier > ships with scripts. Naturally, I don't want to give them the entire > program as thier romping ground. I would like to invoke a seperate > interpreter for these files, and give it a limited subset of the

Re: Executing other python code

2008-01-29 Thread Martin Skou
Over-simplified yes, but it will work! Python is beautiful :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Executing other python code

2008-01-29 Thread Arnaud Delobelle
On Jan 29, 12:18 am, Tim Rau <[EMAIL PROTECTED]> wrote: > I'm working on a game, and I'd like players to be able to define thier > ships with scripts. Naturally, I don't want to give them the entire > program as thier romping ground. I would like to invoke a seperate > interpreter for these files,

Re: Executing other python code

2008-01-29 Thread Diez B. Roggisch
Tim Rau wrote: > I'm working on a game, and I'd like players to be able to define thier > ships with scripts. Naturally, I don't want to give them the entire > program as thier romping ground. I would like to invoke a seperate > interpreter for these files, and give it a limited subset of the > fu

Re: Executing other python code

2008-01-28 Thread Rolf van de Krol
AFAIK this can't be done with just python. You can use the C API of Python to achieve this. I don't know the details of that, but I guess you will need this (http://docs.python.org/api/api.html). Rolf Tim Rau wrote: > I'm working on a game, and I'd like players to be able to define thier > ship

Executing other python code

2008-01-28 Thread Tim Rau
I'm working on a game, and I'd like players to be able to define thier ships with scripts. Naturally, I don't want to give them the entire program as thier romping ground. I would like to invoke a seperate interpreter for these files, and give it a limited subset of the functions in my game. What i