Globals, Locals Dictionaries + Callbacks Question
Faisal Alquaddoomi
falquaddoomi at umail.ucsb.edu
Wed Dec 21 17:06:20 EST 2005
Steve Holden wrote:
> Faisal Alquaddoomi wrote:
>
>> Hello,
>>
>> I'm having a bit of trouble isolating my scripts from each other in my
>> embedded Python interpreter, so that their global namespaces don't get
>> all entangled.
>
>
> [tales of woe ...]
>
> Would it help to use PyNewInterpreter to create subinterpreters for each
> of the different scripts?
>
> regards
> Steve
That sounds like a reasonable suggestion, but would it be inefficient to
spawn a whole new interpreter for each script, where what I really want
to do is just change the dictionaries used for globals and locals? I'll
try that out for now, but I'm still hoping there's some way to change
those dictionaries without having to do anything excessive.
Thanks for the advice,
Faisal
More information about the Python-list
mailing list