auto import

alf ask at me
Mon Jan 21 04:08:18 CET 2008


is there any way to tweak __import__ so it imports module with another 
arbitrary selected module included?

For instance I have my module. Then when I import a module from other place the is 
automatically imported without a explicit import. The effect is the same 
like below:

import * from mylibs

In my software I hundreds of small modules constituting certain custom 
scripts. I need an ability to dynamically control what is imported into 
  them before custom code kicks in.


More information about the Python-list mailing list