[Python-Dev] Towards a Python based import scheme

Gordon McMillan gmcm@hypernet.com
Wed, 15 Sep 1999 16:43:27 -0400

Marc-Andre wrote:

> To get a little more constructive I've started hacking away on
> Greg Stein's imputil.py to make it work with my DateTime package.

>  http://starship.skyport.net/~lemburg/imputil.py

You (and Greg) are missing a rather important patch I 
submitted to Greg a long time ago (around line 62):

  def _reload_hook(self, module):
    # gmcm - Hmmm, reloading of a module may or may not 
be impossible,
    # (depending on the importer),  but at least we can
    # look to see if it's ours to reload:
    if hasattr(module, '__importer__'):
      if getattr(module, '__importer__') == self:
        raise SystemError, "reload not yet implemented"
    return self.__chain_reload(module)

- Gordon