equal
deleted
inserted
replaced
79 importer = object.__getattribute__(self, 'importer') |
79 importer = object.__getattribute__(self, 'importer') |
80 target = object.__getattribute__(self, 'target') |
80 target = object.__getattribute__(self, 'target') |
81 |
81 |
82 return getattr(importer.module(), target) |
82 return getattr(importer.module(), target) |
83 |
83 |
|
84 def __call__(self, *args, **kwargs): |
|
85 target = object.__getattribute__(self, 'module')() |
|
86 return target(*args, **kwargs) |
|
87 |
84 def demandload(scope, modules): |
88 def demandload(scope, modules): |
85 '''import modules into scope when each is first used. |
89 '''import modules into scope when each is first used. |
86 |
90 |
87 scope should be the value of globals() in the module calling this |
91 scope should be the value of globals() in the module calling this |
88 function, or locals() in the calling function. |
92 function, or locals() in the calling function. |