[python-win32] Several, totally isolated Python interpreters in the same process

Thomas Heller theller at ctypes.org
Mon Dec 19 16:26:08 CET 2011


I made an experiment that I wanted to share because it is imo kind of cool:

I managed to embed a second Python interpreter in a Python process, with
help of WinSxS (WinSxS is a Microsoft technology that allows to isolate
plugins from other plugins, or from the calling process).

The second interpreter is totally isolated from the calling process.

The idea is to use this technology to decouple COM extensions 
implemented in Python from the caller and from other COM extensions.
But there may be other uses as well...

The code is here:

http://code.google.com/p/ctypes-stuff/source/browse/trunk/winsxs


Information I found useful about WinSxS and assemblies:

http://msdn.microsoft.com/en-us/library/dd408052%28v=VS.85%29.aspx

http://omnicognate.wordpress.com/2009/10/05/winsxs/


Thomas



More information about the python-win32 mailing list