[python-win32] sys.path and PyWin32 scripting engine

Marc-Andre Belzile Marc-Andre.Belzile at autodesk.com
Tue Jul 20 18:26:16 CEST 2010

I'm referring to Python Active Scripting engines available in pywin32. I'm creating them through COM, so I don't tknow if the ActiveX goes through Py_NewInterpreter or not.


-----Original Message-----
From: python-win32-bounces+marc-andre.belzile=autodesk.com at python.org [mailto:python-win32-bounces+marc-andre.belzile=autodesk.com at python.org] On Behalf Of Tim Roberts
Sent: Monday, July 19, 2010 3:37 PM
To: python-win32 at python.org
Subject: Re: [python-win32] sys.path and PyWin32 scripting engine

 Marc-Andre Belzile wrote:
> Is the value of sys.path private for each new scripting engine I
> create ? Or is it global value ?
> According to my test results, any new paths added to sys.path from a
> specific engine seems to be available to others. Is it the expected
> behavior ?

I'm not sure what you mean by "new scripting engine".  Modules are
shared between all interpreters in a single process, but when you call
Py_NewInterpreter, it is supposed to get its own private copy of
sys.modules and sys.path (among several others).  Can you be more specific?

Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.

python-win32 mailing list
python-win32 at python.org

More information about the python-win32 mailing list