Message10739
The ugly truth of the PythonInterpreter class, now that I have looked at the source, seems to be that by default it shares PySystemState objects between instances of PythonInterpreters. This means that having more than one PythonInterpreter won't share local variables, but it WILL share imports and sys.path and a bunch of other things.
If I truly want independent PythonInterpreter objects, I have to create my own PySystemState object for each interpreter. This is easy, but there is no function that helps setup the PySystemState object properly without relying on static mutable state. I'm looking at you, PySystemState.doInitialize() -- lots of goodies here but it acts upon the default system state and there is no way to do the same thing on an independent PySystemState object without duplicating lots of pieces of source code and trying to remove static mutable state. >:( |
|
Date |
User |
Action |
Args |
2016-02-10 18:45:44 | jason_s | set | recipients:
+ jason_s |
2016-02-10 18:45:44 | jason_s | set | messageid: <1455129944.57.0.0580276509049.issue2465@psf.upfronthosting.co.za> |
2016-02-10 18:45:44 | jason_s | link | issue2465 messages |
2016-02-10 18:45:43 | jason_s | create | |
|