示例#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 = frameOutOfContext()
     self.inject()
     return module
示例#2
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 = frameOutOfContext()
     self.inject()
     return module
示例#3
0
 def _frame_of_trace(self):
     return frameOutOfContext()