Пример #1
0
 def import_double(self, name, globals={}, locals={}, fromlist=[], level=-1):
     """import_double(name, globals={}, locals={}, fromlist=[], level=-1) -> module
     """
     if not fromlist:raise ImportError('Use: from ... import ...')
     module = _oldimport(name, globals, locals, fromlist, level)
     self.original = module.__dict__[fromlist[0]]
     self.frame = frame_out_of_context()
     self.inject()
     return module
Пример #2
0
 def _frame_of_trace(self):
     return frame_out_of_context()