.pyc files

Martin von Loewis loewis at informatik.hu-berlin.de
Mon Sep 25 14:47:02 EDT 2000


etoffi at bigfoot.com writes:

> when debugging my python scripts, i often have trouble with the pyc
> files -- they stay around and then, even after i start a new debugging
> section, i find myself debugging old scripts with new source.
> 
> the only solution i have found for this is to restart the debugger,
> which is very annoying.  is there a better solution for my problem?
> 
> (this happens in idle/linux and after some magical pref change, in
> scintilla 132)

I believe the problem is not the pyc file, but the fact that the
module is not reloaded. Or, if it is, some other modules may have done

from mymod import X

Even when mymod changes, they will still have the old value of X,
unless you rerun that import line again. Likewise, if you have
instances of classes, changes the code of a module doesn't magically
change the classes of all the instances.

Regards,
Martin




More information about the Python-list mailing list