Executing other python code

Rolf van de Krol python at rolfvandekrol.nl
Mon Jan 28 20:47:58 EST 2008


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
> 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 is the best way to achieve this effect?
>   



More information about the Python-list mailing list