Extending embedded python-can extensions be local to a dictionary?

Michael Kohout mwkohout at gmail.com
Wed Aug 12 15:44:51 EDT 2009


Hello all-

I've got a multithreaded server-based application that I'd like to use
python to provide plugin support for.  At execution time I would like
each call to the plugin/plugins to have their own implementation of
these extension methods.

Looking at http://docs.python.org/extending/embedding.html#extending-embedded-python,
I see how to add functions, but it looks like they are added at a
global scope-not in a particular environment.  Is there any way to add
an extension to a local environment but not pollute the global env?

FYI, I'm embedding python 2.6, but I'm more than open to embedding
something newer.

thanks
Mike Kohout



More information about the Python-list mailing list