Running code on module import

Michael Hudson mwh at python.net
Fri May 21 05:48:24 EDT 2004


vbasicboy at aol.com (Grant D. Watson) writes:

> You're probably all foo-ed out by now.  Is there any way to do this?
> I'm not married to the import hook idea, it just seemed like the
> most promising to me.

I'd agree with that.

I would also wonder just what on earth you are up to... it seems very
unnatural to me.

Cheers,
mwh

-- 
  It's a measure of how much I love Python that I moved to VA, where
  if things don't work out Guido will buy a plantation and put us to
  work harvesting peanuts instead.     -- Tim Peters, comp.lang.python



More information about the Python-list mailing list