reloading modules

Jeff Davis jdavis at empires.org
Mon Jul 1 05:54:05 EDT 2002


It seems like it might be common to import a module (that may or may not 
have already been loaded) and require that you get the newest version at 
the time of the import.

The way I see it, this requires 3 steps:
1) build a table of the modification times of files that have been imported
2) compare a file's modification time to the time stored in the table
3) import the module if it doesn't exist in the table, do nothing if the 
modification times are the same, and reload it if the modification times 
are different.

My question is: are the python developers planning on including such a 
standard function at some furture time, or should I just plan on having my 
own module for that? Or does a 3rd party one exist?

Thanks,
        Jeff



More information about the Python-list mailing list