Embedding Python in Python

Paul Rubin http
Wed Aug 18 14:37:57 EDT 2004


Robey Holderith <robey at slash_dev_slash_random.org> writes:
> Anyone know a good way to embed python within python?

No.

> I'd like to allow user-defined scriptable objects.  I'd
> like to give them access to modify pieces of my classes.
> I'd like to disallow access to pretty much the rest of
> the modules.

There was a feature called rexec/Bastion for that purposes in older
version of Python, but it was removed because it was insecure.

> Any ideas/examples?

Run your sensitive stuff in a separate process (or separate computer)
and allow the hostile clients to communicate through sockets.



More information about the Python-list mailing list