Looking for advice: supporting multiple embedded interpreters

Paul Miller paul at fxtech.com
Fri Jan 23 10:20:42 EST 2004


>I can't address why it doesn't work in 2.3, but just a question - have
>you thought of not using independent interpreter states, but just
>tracking the contents of sys.modules and clearing out any new modules
>at reload time?  That would force even nested imports to be reloaded.
>You can find an example of doing this in the unittestgui.py module,
>for example, that is part of PyUnit, as it uses this approach to
>ensure that all modules under test are reloaded at the start of
>execution of a test suite.

At first I thought this would work, but then I remembered that I have other 
instances of interpreters and pointers to modules, objects, and functions 
pointing into them. One of my issues is I do not want to affect other 
loaded modules, and if I blow away the global module table, then I would 
mess up all the other instances of scripts that I want to leave alone.







More information about the Python-list mailing list