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

Tim Roberts timr at probo.com
Mon Jul 19 21:36:49 CEST 2010


 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.



More information about the python-win32 mailing list