[Python-Dev] Hook Extension Module Import?

Michael Hudson mwh@python.net
Sun, 20 Apr 2003 21:32:43 +0100

Aahz <aahz@pythoncraft.com> writes:

>> OTOH, it's not obvious to me why this should be so.  Can't I
>> access/replace builtins.__import__ from C/C++?
> Sure, but then you need to replace import.c, just as it says.

Not in this case: if all you want is notification, surely you can call
the original __import__ to do the work...


  In many ways, it's a dull language, borrowing solid old concepts
  from many other languages & styles:  boring syntax, unsurprising
  semantics, few  automatic coercions, etc etc.  But that's one of
  the things I like about it.                 -- Tim Peters, 16 Sep 93