This is a "feature" of Python itself. You probably need the "reload()"
function - have a look at the documentation for this function to see how it
works.
One particular problem is with class instances. Let's say you have a class
Foo, and you executed code like:
f = mymodule.Foo()
to create an instance of this class. If you change the class definition in
"mymodule" and reload it, the changes will _not_ take affect on your
existing 'f' object - however, if you now create a _new_ 'f' object in the
exact same way, the new object will use the new code.
This is true for all classes, whether they are in the file you are running,
or in a different file referenced by your file.
I suggest you search DejaNews for a discussion on this topic and reload().
Indeed, a recent thread on comp.lang.python entitled "Pythonwin IDE SUCKS!"
was about this very topic ;-) However, due to the inflamatory nature of
that thread, there werent alot of useful answers there!
Mark.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> Pawlowsky, Marc
> Sent: Saturday, 18 November 2000 5:34 AM
> To: '[EMAIL PROTECTED]'
> Subject: reloading changed modules
>
>
> When I am using PythonWin, and I change the code for a module
> other than the
>
> one that I running, the changes are not in effect until I close the
> PythonWin and restart
> it again.
>
> Is there a way to have the changed module recompiled and loaded?
>
> Thanks
>
> Marc
> _______________________________________________
> ActivePython mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/activepython
>
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython