Entry
Is there anyway by which the changes made to the saved script can be reflected in the interactive??
Oct 20th, 2004 05:18
Michael Chermside, subha fernando,
[Partial Answer]
I don't know specifically about PythonWin, but in the interactive editor
this can be achieved by using the built-in function reload(). It works
something like this:
>>> import my_module
>>> # now go edit my_module before continuing
>>> reload(my_module)
<module 'my_module' from 'C:\PythonScripts\my_module.py'>
Only the one module that is reloaded will be changed, so if one module
depends on another then this approach is not quite enough. IDLE handles
that problem by providing a menu command that will reload ALL modules
loaded so far. I'm not sure what PythonWin does.
-- Michael Chermside