Bug in `imp' module?

Gordon McMillan gmcm at hypernet.com
Tue Jun 15 16:17:10 CEST 1999


Andrew Dalke writes:

> Summary: imp.find_file returns the .py file before the .pyc file
> when I think it should be the other way around.  Solution should be
> to swap two lines in Python/importdl.c 

Not so simple. The .pyc file is trash if the .py file is newer.

I suggest you follow the earlier lead to Greg's imputil.py. You will 
still have to write code, but you'll be fitting your code into a 
"sane" architecture.

Greg's is at: http://www.lyra.org/greg/small/

If he hasn't yet patched it to properly pass on reload requests, you 
can get a patched version from: 

www.mcmillan-inc.com/dnld/archive.tar.gz


- Gordon




More information about the Python-list mailing list