Jeff Schwab wrote: > Q1: When a module is imported, is there any way for the module to > determine the name of the client code's module? > Why would you ever want to do this? > Q2: My understanding is that the code in a module is executed only on > the first import of that module. Is there any way to have a hook > invoked on subsequent imports, and for that hook (as in Q1) to determine > the name of the client module? > Why would you ever want to do this?
I don't really understand why you wouldn't want to do the following: import foo foo.exec() -- ================== Nick Stinemates ([EMAIL PROTECTED]) http://nick.stinemates.org AIM: Nick Stinemates MSN: [EMAIL PROTECTED] Yahoo: [EMAIL PROTECTED] ================== -- http://mail.python.org/mailman/listinfo/python-list